Bluehost.com Web Hosting $6.95

Another LAST_INSERT_ID() Question

This is a discussion on Another LAST_INSERT_ID() Question within the MySQL Database forums, part of the Database Forums category; insert into tablename (ColA, ColB) values (1,2), (3,4) select last_insert_id() as lid lid returns the value for the ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-30-2007
Lee Peedin
 
Posts: n/a
Default Another LAST_INSERT_ID() Question

insert into tablename (ColA, ColB) values (1,2), (3,4)
select last_insert_id() as lid

lid returns the value for the row with the 1,2 values which is lower
than the row with the 3,4 values.

Is this the expected behavior?

TIA
Lee


Reply With Quote
  #2 (permalink)  
Old 01-30-2007
Willem Bogaerts
 
Posts: n/a
Default Re: Another LAST_INSERT_ID() Question

> insert into tablename (ColA, ColB) values (1,2), (3,4)
> select last_insert_id() as lid
>
> lid returns the value for the row with the 1,2 values which is lower
> than the row with the 3,4 values.
>
> Is this the expected behavior?


Yes. Is is in the manual, so you could expect it.

--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:23 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0