Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-03-14 : 09:08:20
|
Juan writes "I try to do a delete trigger for do this but don't work.
I want to delete the record in the master table and then delete the child table. My trigger looks
CREATE TRIGGER Cascade_Delete FOR UPDATE AS
DECLARE @cod_delete char(20)
SELECT @cod_delete = (SELECT cod_delete FROM DELETED) DELETE FROM CHILD WHERE cod_delete = @cod_delete
And I want the trigger works in staments like
DELETE FROM master
and delete all the record in the related tables
How I do that?
Thanks
Juan Véliz
PD:Sorry my english is not good PD1:I use WNT 4.0 Server SP6 and SQL Server 7.0 SP3" |
|
|
|
|
|