| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Shawn Green | Date: | October 17 2012 1:33pm |
| Subject: | Re: Possible to copy the key field to another on INSERT? | ||
| View as plain text | |||
Hello Dehua, On 10/17/2012 3:33 AM, Dehua Yang wrote: > select LAST_INSERT_ID() ; Under high concurrency , it would return other > threads value to you. > Incorrect. The results of LAST_INSERT_ID() are connection-specific. The activity on other connections will not change or alter the value for the current connection. Only actions taken by the current connection can change this value. http://dev.mysql.com/doc/refman/5.5/en/information-functions.html#function_last-insert-id -- Shawn Green MySQL Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN
| Thread | ||
|---|---|---|
| • Possible to copy the key field to another on INSERT? | W. D. | 17 Oct |
| • Re: Possible to copy the key field to another on INSERT? | Dehua Yang | 17 Oct |
| • Re: Possible to copy the key field to another on INSERT? | Shawn Green | 17 Oct |
| • Re: Possible to copy the key field to another on INSERT? | Dehua Yang | 17 Oct |
| • Re: Possible to copy the key field to another on INSERT? | Claudio Nanni | 17 Oct |
| • Re: Possible to copy the key field to another on INSERT? | W. D. | 17 Oct |
| • Re: Possible to copy the key field to another on INSERT? | W. D. | 18 Oct |
