which columns would an index be automatically created when you execute the above SQL statement?

Examine the SQL statement that creates ORDERS table:
CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE
DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN (‘CREDIT’, ‘CASH’)), PROD_ID
NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY
(order_id, order_date));
For which columns would an index be automatically created when you execute the above SQL
statement? (Choose two.)

Examine the SQL statement that creates ORDERS table:
CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE
DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN (‘CREDIT’, ‘CASH’)), PROD_ID
NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY
(order_id, order_date));
For which columns would an index be automatically created when you execute the above SQL
statement? (Choose two.)

A.
SER_NO

B.
ORDER_ID

C.
STATUS

D.
PROD_ID

E.
ORD_TOTAL

F.
composite index on ORDER_ID and ORDER_DATE

Explanation:
Index exist for UNIQUE and PRIMARY KEY constraints
Incorrect answer:
BORDER_ID is neither UNIQUE nor PRIMARY KEY
CSTATUS is neither UNIQUE nor PRIMARY KEY
DPROD_ID is neither UNIQUE nor PRIMARY KEY
EORD_TOTAL is neither UNIQUE nor PRIMARY KEY
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-15



Leave a Reply 0

Your email address will not be published. Required fields are marked *