| Martijn Tonies 2005-10-27, 7:47 am |
| 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. databasedevelopmentf
orum.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
|