MySQL Forums
Forum List  »  Triggers

Re: CALL SP in Trigger
Posted by: Thomas CORBIERE
Date: October 29, 2005 03:21AM

You can use select statements in trigger but they must NOT return a result set to the client.
What this means is that you can use select that return only one row and put the result in variables with the SELECT INTO syntax :

SELECT MAX(ID)+1 INTO NEW_ID FROM tbl_test;

Thomas CORBIERE

Options: ReplyQuote


Subject
Views
Written By
Posted
5367
October 28, 2005 11:19AM
2497
October 28, 2005 11:47AM
2573
October 28, 2005 11:50AM
2469
October 28, 2005 12:23PM
2649
October 29, 2005 01:57AM
2647
October 29, 2005 03:06AM
Re: CALL SP in Trigger
2308
October 29, 2005 03:21AM
2204
October 29, 2005 03:28AM
4025
February 28, 2006 01:17AM
2721
February 28, 2006 01:39AM
2473
February 28, 2006 02:54AM
2317
February 28, 2006 07:19AM
2314
February 28, 2006 11:15PM
2291
February 28, 2006 11:45PM
2221
February 28, 2006 05:25AM
3435
February 28, 2006 05:46AM
2296
February 28, 2006 06:28AM
2213
March 01, 2006 03:17AM


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.