QuestionQ279

VerifiedManipulating Data

Examine the definition of the EMPLOYEES table:

| Column | Data type | Constraint |

|---|---|---|

| EMPLOYEE_ID | NUMBER | Primary Key |

| FIRST_NAME | VARCHAR2(25) | |

| LAST_NAME | VARCHAR2(25) | |

Which three statements insert a row into the table?

Choose three
Explanation

A primary-key column cannot contain NULL. When an INSERT column list omits a column, Oracle assigns its default value; without a declared default, that is NULL, so EMPLOYEE_ID must be explicitly supplied with a valid numeric value. The name columns are nullable because no NOT NULL constraint is specified. Statements C, E, and F satisfy these requirements; D assigns the character value Smith to the numeric EMPLOYEE_ID column.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!