Explain various On-Delete options in a DB table. Which is the default option?



Explain various On-Delete options in a DB table. Which is the default option?..

Answer / Alok Ranjan

In SQL, there are three main on-delete options for foreign keys: CASCADE, SET NULL, and NO ACTION. CASCADE deletes the referenced rows from the child table when a row is deleted from the parent table. SET NULL sets the foreign key to NULL when a row is deleted from the parent table. NO ACTION prevents the operation from being performed, causing an error instead.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Differentiate between SQL and ORACLE joins and write their syntax.

1 Answers   Global Logic,


How do you rebuild an identity column?

1 Answers  


which query u can write to sql server doesn't work inbetween 7.00PM to nextday 9.00AM

5 Answers   Wipro,


How to create a login account in ms sql server to access the database engine using "create login" statements?

1 Answers  


What is the use of builtinadministrators group in sql server? : sql server security

1 Answers  


Tell me about normalization in DBMS.

1 Answers   Honeywell, Zomato,


What is sql server replication? : sql server replication

1 Answers  


What is merge replication?

1 Answers  


What is an execution plan? When would you use it?

1 Answers  


What is onf in normalization form?

1 Answers  


What is the downside of using udf?

1 Answers  


System variable and temporary variables

1 Answers   Wipro,


Categories