//titleauthor is foreigntable
//titles Primary Table......When you delete data from Primary automatically delete data from foreign table.....
//title_id is a Unique key in both table..
//deleted is a magic Table where delete data is stored...
create trigger delcascadetrig
on titleauthor
for delete
as
delete delcascadetrig
from titles, deleted
where titles.title_id = deleted.title_id
Monday, April 12, 2010
Subscribe to:
Posts (Atom)