Re: CALL A PROCEDURE USING TRIGGERS
Hi Merlin,
It is possible with some limitations.
script:
DELIMITER $$
DROP TRIGGER `p`$$
CREATE TRIGGER `p` AFTER INSERT on `t1`
FOR EACH ROW
BEGIN
CALL spprueba(NEW.id);
END$$
DELIMITER ;
DELIMITER $$
DROP PROCEDURE IF EXISTS `spprueba`$$
CREATE PROCEDURE `spprueba` (pid INT)
BEGIN
/* it does not work */
/* Not allowed to return a result set from a trigger */
SELECT * FROM t1;
/* it work */
INSERT INTO t2 (id) values (pid);
END$$
DELIMITER ;
Subject
Views
Written By
Posted
4328
November 09, 2006 04:16AM
Re: CALL A PROCEDURE USING TRIGGERS
14581
November 09, 2006 05:05AM
4419
May 15, 2008 01:15AM
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.