What is the default behavior of a foreign key when a referenced row is deleted? MCQ with Answer and Explanation

What is the default behavior of a foreign key when a referenced row is deleted?
A. Set null
B. Depends on the ON DELETE action specified
C. Restrict
D. Cascade delete
Answer: Option B
Solution (By JKSSB Mock Tests)
The behavior is defined by the ON DELETE rule (CASCADE, SET NULL, RESTRICT, NO ACTION) specified in the foreign key constraint.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
Which SQL function is used to find the maximum value in a column?
A. MAX()
B. AVG()
C. SUM()
D. MIN()

Correct Answer: Option A


Explanation:
MAX() returns the highest value in a selected column.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which of the following is a non-aggregate function in SQL?
A. COUNT()
B. LENGTH()
C. AVG()
D. SUM()

Correct Answer: Option B


Explanation:
LENGTH() (or LEN()) is a string function that returns the length of a string, not an aggregate. SUM, COUNT, AVG are aggregates.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is the difference between a clustered index and a non-clustered index?
A. Clustered index is faster for inserts
B. Non-clustered index determines physical order; clustered does not
C. They are the same
D. Clustered index determines the physical order of data; non-clustered does not

Correct Answer: Option D


Explanation:
A clustered index sorts and stores the data rows in the table based on key values, while a non-clustered index is a separate structure that points to the data rows.

This question belongs to: Computer Database Management System (DBMS)