Topic / 89 questions

DBMS and SQL MCQs

Page 3 of DBMS and SQL multiple-choice questions with answers. Tap an option to check yourself.

Page 3 of 5

Advertisement
Question 44 DBMS and SQL

What makes a subquery a correlated subquery?

Correct answer D. It refers to a column of the outer query, so it is evaluated for each outer row

Open question
Question 46 DBMS and SQL

Emp.dept_id is a foreign key to Dept(id) and is not declared NOT NULL. What happens when you insert an Emp row with dept_id set to NULL?

Correct answer B. The insert succeeds, because a NULL foreign key is not checked

Open question
Question 47 DBMS and SQL

Emp.dept_id is a foreign key referencing Dept(id), declared with no ON DELETE action. What happens if you try to delete a Dept row that some Emp rows still reference?

Correct answer D. The delete is rejected with a foreign key violation

Open question
Advertisement
Advertisement