From: Martijn Tonies Date: October 26 2005 3:06pm Subject: Re: DELETE Trigger List-Archive: http://lists.mysql.com/mysql/190891 Message-Id: <057a01c5da3e$df689dd0$c802a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hello Scott, > How do I create a trigger in MySQL similiar to the trigger created for mssql: > > CREATE TRIGGER DEL_DE ON KRONOS > AFTER DELETE > AS > DELETE FROM > DE_Metrics > WHERE > KID=( > SELECT > ID > FROM > DELETED > ); > > I already read online mysql TRIGGER, CREATE TRIGGER and USING TRIGGER > to no avail. I think - without trying - AS begin delete from de_metrics where kid = old.id; end Check the syntax though :-) Anyway, MySQL doesn't have the fake tables "deleted", but "per row" triggers. With regards, Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL Server Upscene Productions http://www.upscene.com Database development questions? Check the forum! http://www.databasedevelopmentforum.com