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

Answer Posted / krishnakumar

create table employee(id int references authors(au_id) ON
DELETE CASCADE,firstname(30))



this is chilld table .in this query use on first child table
constraints values delete next parent table constrains value
delete ... this is ON DELETE CASCADE CONCEPT

Is This Answer Correct ?    7 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to integrate the ssrs reports in application?

713


How many null values we can have in a unique key field in sql server?

710


Explain the various types of concurrency problem?

921


Explain some stored procedure creating best practices or guidelines?

677


What happens when transaction log is full?

657






What is an indexing strategy?

705


What is meant by referential integrity?

747


Does group by or order by come first?

713


What are “phantom rows”?

1407


Define cross join in sql server joins?

748


What is extended stored procedures?

714


What is de-normalization in sql database administration? Give examples?

712


What command is used to delete a table from the database in the sql server and how?

739


What is meant by dirty read?

761


How to create a new login name in ms sql server?

702