MySQL Forums
Forum List  »  Triggers

Re: Obtain primary key value generated by before-insert trigger
Posted by: Ross Goldberg
Date: March 09, 2016 03:31PM

The primary key column of my table is not auto_increment.

My before-insert trigger generates a primary key value, which then successfully writes to the table.

The problem is that my calling client must be able to retrieve that value, in a thread-safe manner.

I tried running your select after I performed an insert, but the select always returned null.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Obtain primary key value generated by before-insert trigger
870
March 09, 2016 03:31PM


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.