How to write query to Delete the records in child table
and corresponding records in parent table

Answer Posted / arijitnit

delete from child_table where values=...
on delete cascade..
U have to set the foreign key as the parent super key

Is This Answer Correct ?    11 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a file group?

790


What is exporting and importing utility?

774


Can we shrink data file in sql server?

758


How to change the password of a login name in ms sql server?

715


Where are sql server user names and passwords stored in sql server?

734






How to find out what is the default collation in a database?

790


How to get the definition of a user defined function back?

805


Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture

653


List the various tools available for performance tuning?

641


How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?

766


Tell me what is the stuff and how does it differ from the replace function?

716


What is the temp table?

701


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

831


What is parameterized reports in ssrs ?

125


there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration

661