MySQL Forums
Forum List  »  Stored Procedures

LAST_INSERT_ID() question.
Posted by: peter.hamilton-scott
Date: November 05, 2005 04:05PM

Let's say I have table A that has an auto_increment column. In an after update trigger I write an audit record to table B which also has an auto_increment column. If I insert a new record into A, the trigger gets called but if I want to return the last inserted id, does it return the one for table A or table B?



Edited 1 time(s). Last edit at 11/05/2005 04:05PM by peter.hamilton-scott.

Options: ReplyQuote


Subject
Views
Written By
Posted
LAST_INSERT_ID() question.
3302
November 05, 2005 04:05PM
1984
November 05, 2005 05:33PM
1914
November 06, 2005 02:01AM
2474
November 06, 2005 07:20AM
1997
November 06, 2005 12:26PM
1903
November 06, 2005 12:44PM
2904
November 06, 2005 04:52PM
1937
November 06, 2005 06:45PM
1809
November 07, 2005 01:44AM
1829
November 07, 2005 09:27AM


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.