Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about after delete trigger?

Status
Not open for further replies.

sjh

Programmer
Oct 29, 2001
263
US
Hi, I have a question about the triggers in Sybase.
I would like to execute the following trigger but only if the original delete operation was successful. Is this something that I have to code in the trigger, or is it not necessary? If it is needed, please help me with the code!

Thank you!
SJH

Code:
CREATE TRIGGER AfterDelete_myTable
AFTER DELETE ORDER 1 ON myTable
	
    REFERENCING OLD AS deleted 
    FOR EACH ROW

BEGIN
    DELETE FROM myTable 
    WHERE myTable.parent_id = deleted.id;
END
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top