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

Explain security with sql azure?

186


How many ways to create table-valued functions?

978


What are xml indexes?

941


What is lock escalation and what is its purpose?

970


What do you understand by hotfixes and patches in sql server?

981


Explain “@@rowcount” and “@@error” in sql server?

1082


What are various aggregate functions that are available?

976


Can select statements be used on views in ms sql server?

1061


what is checksum in sql server.........???

1680


Is it important for a database administrator to understand the operating system and file access?

975


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?

121


What is a print index?

880


What is the difference between upgrade and migration in sql server?

1084


Can we call stored procedure in trigger?

946


How to see the event list of an existing trigger using sys.trigger_events?

1069