How to write query to Delete the records in child table
and corresponding records in parent table
Answer Posted / surya
use this:
DELETE FROM childTable WHERE EXISTS(SELECT id FROM
parentTable WHERE parentTable .id = childTable .id where id = 1)
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
What is the full form of dql?
What are the various editions of sql server 2017 that are available in the market?
How would you go about developing a ssrs report?
What are “lost updates”?
Explain an incremental backup?
What are difference between Cluster index and Non-Cluster index?
What is single-user mode and what are the steps you should follow to start sql server in single-user mode?
How to make a column nullable?
what are different types of backups available in sql server? : Sql server database administration
How to backup SQL Server Reporting Services ?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
How do database indexes work?
What is database isolation in sql server? : sql server database administration
Why do we use trigger?
What are the mathematical functions supported by sql server 2005?