MySQL Forums
Forum List  »  Triggers

Re: Trigger referencing another table and calling SP
Posted by: Roland Bouman
Date: July 28, 2005 09:35AM

It seems that CALL is now (5.0.10) supported from within a trigger:

mysql> use test;
Database changed
mysql> create table t(id int );
Query OK, 0 rows affected (0.16 sec)
mysql> delimiter $$
mysql> create procedure p()begin declare i int; set i:= 1; end;
-> $$
Query OK, 0 rows affected (0.00 sec)
mysql> create trigger test_trigger1 before insert on test.t for each row begin call p(); end;
-> $$
Query OK, 0 rows affected (0.00 sec)

By the looks of it, you can even reference another table from within that procedure.
Anyone to verify?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Trigger referencing another table and calling SP
4356
July 28, 2005 09:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.