6 messages in com.mysql.lists.javaRE: How to get the result of a auto_i...
FromSent OnAttachments
gmic...@freegates.be29 Mar 2001 00:32 
alec...@quantel.com29 Mar 2001 01:10 
Tomasz Pawlowski29 Mar 2001 08:27 
Filip Hanik29 Mar 2001 08:58 
Filip Hanik29 Mar 2001 09:18 
alec...@quantel.com29 Mar 2001 23:51 
Subject:RE: How to get the result of a auto_increment integer after an INSERT
From:Tomasz Pawlowski (tpne@yahoo.com)
Date:03/29/2001 08:27:36 AM
List:com.mysql.lists.java

Are you sure that this always gives correct result? Another client/user may
insert the record between our INSERT, and the query for last_insert_id. Please correct me if I'm wrong.

T

======================================= Two ways. Portably, SELECT LAST_INSERT_ID() Non-portably, but probably faster, recordCreated = ((org.gjt.mm.mysql.Statement) stmt).getLastInsertID () ;