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
Explain security with sql azure?
How many ways to create table-valued functions?
What are xml indexes?
What is lock escalation and what is its purpose?
What do you understand by hotfixes and patches in sql server?
Explain “@@rowcount” and “@@error” in sql server?
What are various aggregate functions that are available?
Can select statements be used on views in ms sql server?
what is checksum in sql server.........???
Is it important for a database administrator to understand the operating system and file access?
You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?
What is a print index?
What is the difference between upgrade and migration in sql server?
Can we call stored procedure in trigger?
How to see the event list of an existing trigger using sys.trigger_events?