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
What is microsoft sql server?
What are the types of normalization?
What is the temp table?
What is encryption key?
What are the new features of sql server 2012 reporting service?
How to set database to be read_only in ms sql server?
Is mysql the same as sql server?
What do you mean by data manipulation language?
What is difference between join and natural join?
How to list all user names in a database?
Do I need a report server to run reports in my application?
What are the two modes of authentication in sql server?
How to create a simple stored procedure in ms sql server?
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
What is difference between oltp and olap?