32. Which create table statement is valid?
A. create table ord_details
(Ord_no NUMBER (2) primary key,
Item_no NUMBER (3) primary key,
Ord_date date not null );
B. CREATE TABLE ord_details
(Ord_no NUMBER (2) UNIQUE, not null,
Item_no NUMBER (3 ),
Ord_date date default sysdate not null );
C. create table ord_details
(Ord_no NUMBER (2 ),
Item_no NUMBER (3 ),
Ord_date date default not null,
CONSTRAINT ord_uq UNIQUE (ord_no ),
CONSTRAINT ord_pk primary key (ord_no ));
D. create table ord_details
(Ord_no NUMBER (2 ),
Item_no NUMBER (3 ),
Ord_date date default sysdate not null,
CONSTRAINT ord_pk primary key (ord_no, item_no ));
Answer: D
A: Error. A table can have only one primary key.
B: error. The UNIQUE is followed by a comma (,), which is the delimiter between fields. spaces are used between multiple constraints.
C: Error. Default is not followed by Default.
D: Correct.