Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the full form of dql?

985


What are the various editions of sql server 2017 that are available in the market?

892


How would you go about developing a ssrs report?

168


What are “lost updates”?

1001


Explain an incremental backup?

1003


What are difference between Cluster index and Non-Cluster index?

1081


What is single-user mode and what are the steps you should follow to start sql server in single-user mode?

971


How to make a column nullable?

1115


what are different types of backups available in sql server? : Sql server database administration

938


How to backup SQL Server Reporting Services ?

148


What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?

4386


How do database indexes work?

1012


What is database isolation in sql server? : sql server database administration

1109


Why do we use trigger?

974


What are the mathematical functions supported by sql server 2005?

1071