At 17:02 +0000 2/24/04, David Scott wrote:
Hi list peeps....
In many of my projects I have the need to insert a new record into a table and then later on in the script update this record, Right now I am doing this by doing the insert, then immediately doing a Select to return the latest id (unique id) which I store later for my update.


Is there any way I can do an insert and have it return the unique auto-assigned id?

If you mean, can you have the insert statement itself return the ID, no. Insert statements don't return records.


-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com

MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to