Among the following, choose the correct SQL statement to create a table named Employee with attributes EmployeeNo,
Question:
Among the following, choose the correct SQL statement to create a table named Employee with attributes EmployeeNo, Name, Address, Age, Job, Salary where EmployeeNo must be unique and not null and Age must be greater than 21.
Answer Choices:
Employee(EmployeeNo INTEGER UNIQUE, INTEGER, Job
a. CREATE TABLE VARCHAR2(30), Address VARCHAR2(30), Age VARCHAR2(30), Salary real, CHECK(Age21)); Name
b. CREATE Employee(EmployeeNo INTEGER primary key, Name VARCHAR2(30), Address VARCHAR2(30), Age INTEGER, Job VARCHAR2(30), Salary real, CHECK(Age 21));
c. CREATE TABLE Employee(EmployeeNo INTEGER primary key, Name VARCHAR2(30), Address VARCHAR2(30), Age INTEGER, Job VARCHAR2(30), Salary real, CHECK(Age 21));
d. CREATE TABLE Employee(EmployeeNo INTEGER NOT NULL, Name VARCHAR2(30), Address VARCHAR2(30), Age INTEGER, Job VARCHAR2(30), Salary real, CHECK(Age 21)
Database Processing Fundamentals, Design, and Implementation
ISBN: 978-0133876703
14th edition
Authors: David M. Kroenke, David J. Auer