Multiple choice technology databases

  1. Evalute the CREAT TABLE Statement: CREATE TABLE products (prod_id NUMBER(6) CONSTRAINT PROD_ID_PK PRIMARY KEY, product_name VARCHAR2(10)) ; Which statement is true regarding the PROD_ID_PK constraint?

  1. It would be created only if a unique index is manually created first.

  2. It would be created and would ues an automatically created no unique index

  3. It would be created and would use an automatically created unique index

  4. It would be created and reamins in a disabled state because no index is specified in the command

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When a PRIMARY KEY constraint is defined in Oracle, it automatically creates a unique index to enforce uniqueness. This is default behavior - no manual index creation is required. The index is created automatically and maintained by the database to support the constraint.

AI explanation

When you declare a PRIMARY KEY constraint inline (as PROD_ID_PK here) without explicitly specifying an index, Oracle automatically creates a unique index on the constrained column(s) to enforce uniqueness and support fast lookups — this is standard Oracle behavior for primary key constraints. It is not left disabled (constraints are enabled by default unless DISABLE is specified), doesn't require a manually pre-created index, and the auto-created index is unique, not non-unique, since PK values must be unique.