nerdexam
Oracle

1Z0-007 · Question #72

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'))…

The correct answer is A. SER_NO F. composite index on ORDER_ID and ORDER_DATE. Index exist for UNIQUE and PRIMARY KEY constraints Incorrect answer: B ORDER_ID is neither UNIQUE nor PRIMARY KEY C STATUS is neither UNIQUE nor PRIMARY KEY D PROD_ID is neither UNIQUE nor PRIMARY KEY E ORD_TOTAL is neither UNIQUE nor PRIMARY KEY

Creating and Managing Schema Objects

Question

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.)

Options

  • ASER_NO
  • BORDER_ID
  • CSTATUS
  • DPROD_ID
  • EORD_TOTAL
  • Fcomposite index on ORDER_ID and ORDER_DATE

How the community answered

(38 responses)
  • A
    74% (28)
  • B
    3% (1)
  • C
    3% (1)
  • D
    13% (5)
  • E
    8% (3)

Explanation

Index exist for UNIQUE and PRIMARY KEY constraints Incorrect answer: B ORDER_ID is neither UNIQUE nor PRIMARY KEY C STATUS is neither UNIQUE nor PRIMARY KEY D PROD_ID is neither UNIQUE nor PRIMARY KEY E ORD_TOTAL is neither UNIQUE nor PRIMARY KEY

Topics

#auto-created indexes#UNIQUE constraint#PRIMARY KEY#DDL

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice