| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | September 19 2002 5:42pm |
| Subject: | Re: Auto Increment ID of Inserted Row | ||
| View as plain text | |||
At 13:23 -0400 9/19/02, Steven Kreuzer wrote: >SELECT MAX(id_field) FROM table That won't give you the correct answer if some other client gets in there an inserts a row before you have a change to get the MAX() value. LAST_INSERT_ID() is designed for this; it's not affected by whatever other clients are doing. >SK > >On Thursday, September 19, 2002, at 12:55 PM, Davis, Tim wrote: > >>What is the SQL to get the created AutoInc ID from a row that I have just >>inserted? >> >>Tim Davis >>Sunbelt Systems Concepts, Inc >>twdavis@stripped >>Client/Server Database Programmer/Analyst
| Thread | ||
|---|---|---|
| • Auto Increment ID of Inserted Row | Tim Davis | 19 Sep |
| • Re: Auto Increment ID of Inserted Row | Paul DuBois | 19 Sep |
| • Re: Auto Increment ID of Inserted Row | Steven Kreuzer | 19 Sep |
| • Re: Auto Increment ID of Inserted Row | Paul DuBois | 19 Sep |
| • Re: Auto Increment ID of Inserted Row | Rodney Broom | 19 Sep |
| • Re: Auto Increment ID of Inserted Row | Dan Nelson | 19 Sep |
| • RE: Auto Increment ID of Inserted Row | Michael Tam | 19 Sep |
