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
| Thread |
|---|
| • DELETE Trigger | Scott Hamm | 26 Oct |
| • Re: DELETE Trigger | Martijn Tonies | 26 Oct |