Oracle
1Z0-047 · Question #39
Evaluate the following CREATE TABLE command: CREATE TABLE order_item (order_id NUMBER(3), Item_id NUMBER(2), qty NUMBER(4), CONSTRAINT ord_itm_id_pk PRIMARY KEY (order_id jtem_id) USING INDEX…
The correct answer is A. It would execute successfully and only ORD_ITM_IDX index would be created. See the full explanation below for the reasoning.
Question
Evaluate the following CREATE TABLE command:
CREATE TABLE order_item (order_id NUMBER(3), Item_id NUMBER(2), qty NUMBER(4), CONSTRAINT ord_itm_id_pk PRIMARY KEY (order_id jtem_id) USING INDEX (CREATE INDEX ord_itm_idx ON order_item(order_id item_id))); Which statement is true regarding the above SOL statement?
Options
- AIt would execute successfully and only ORD_ITM_IDX index would be created.
- BIt would give an error because the USING INDEX clause cannot be used on a composite primary key.
- CIt would execute successfully and two indexes ORD_ITM_IDX and ORD_ITM_ID_PK would be created.
- DIt would give an error because the USING INDEX clause is not permitted in the CREATE TABLE command.
How the community answered
(55 responses)- A82% (45)
- B2% (1)
- C5% (3)
- D11% (6)
Community Discussion
No community discussion yet for this question.