How to write query to Delete the records in child table
and corresponding records in parent table
Answer Posted / chaitanya
***********
Delete from P_table where P_Id=C_Id
***********
This is only aplicable if you have defined the foreign key
in the child table with the constraint on Delete Cascade.
Else you will get a Integration error.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Difference between aggregate functions of sql?
Please differentiate between a local and a global temporary table?
What is the command used to check locks in microsoft sql server?
What are the advantages of using stored procedures?
Can I use sql azure as a backup with log shipping or database mirroring?
How many types of database relationship in sql server?
In case you have filters in your report, when filters will be applied in cached report instance?
Explain triggers?
Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture
What is the difference between value type and reference type?
What stored by the master? : sql server database administration
What is ems sql management studio? : sql server management studio
Do you know what are different types of replication in sql server?
What are the new features of sql server 2008 r2 reporting service?
What happens if you delete a table that is used by a view?