Database Management
Accenture Technical PrimermediumDatabase ManagementSelect Statement

Create table subjects(Sub_id number(2) primary key,Subj_name varchar(50)); Insert into subjects values (null,’Oracle’); What will be the output of the given query?

Answer options

A
The query will generate an ORA-01400: cannot insert NULL into primary key.
B
The query will execute successfully.
C
The query will insert a NULL value as stud_id.
D
The query will generate a duplicate key error.

Correct answer: The query will generate an ORA-01400: cannot insert NULL into primary key.

Explanation

Quick AnswerThe correct answer is The query will generate an ORA-01400: cannot insert NULL into primary key. because it directly addresses the core logic of Database Management.

Primary key columns cannot be NULL; omitting Sub_id causes ORA-01400.

Related Accenture Database Management questions

Practice more Accenture Database Management questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!