Which create table statement is valid?

Which create table statement is valid?

Which create table statement is valid?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:

PRIMARY KEY Constraint
A PRIMARY KEY constraint creates a primary key for the table. Only one primary key can be
created for each table. The PRIMARY KEY constraint is a column or a set of columns that
uniquely identifies each row in a table. This constraint enforces the uniqueness of the column or
column combination and ensures that no column that is part of the primary key can contain a null
value.
Note: Because uniqueness is part of the primary key constraint definition, the Oracle server
enforces the uniqueness by implicitly creating a unique index on the primary key column or
columns.



Leave a Reply 2

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


Marcelo

Marcelo

easy, if for elimination not need to read the statement.
It is not possible to declare two PRIMARY KEY, can not be separated by commas restrictions of a column (NOT NULL, UNIQUE), and the DEFAULT value can not be defined with NO TE NULL.
The correct answer D., easy.

Leandro

Leandro

The problem with C is not only the missing of the default value, but also the unique and the primairy key constraint both on the same column. Correcting the default for the date would still produce the error ORA-02261: such unique or primary key already exists in the table.