MySQL Forums
Forum List  »  Triggers

trigger that uses dynamic Sql
Posted by: Estela Gonzalez
Date: September 27, 2007 04:00PM

Hi all, Use Mysql v5.32, desire to activate to trigger that it uses dynamic SQL. That is possible in this version?

For ej,

reate trigger BEFORE UPDATE on product
for each row BEGIN
CALL a(id);
end;


////
CREATE PROCEDURE `a`(IN id int)
begin
set @x1=id;
set @y1=3;
set @xx=concat('call ',@x1,'(?,@z);');
prepare s2 from @xx;
END$$

DELIMITER ;

Options: ReplyQuote


Subject
Views
Written By
Posted
trigger that uses dynamic Sql
3297
September 27, 2007 04:00PM
2118
September 27, 2007 07:38PM
2007
September 28, 2007 09:52AM
1889
September 28, 2007 03:46PM


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.