List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 16 2002 3:25pm
Subject:Re: RE: Inserting Master and Details records
View as plain text  
sql,query

At 0:07 +1000 10/17/02, Alan McDonald wrote:
>Peter,
>Thanks you - I looked up Insert_ID() in the manual...
>Page 171-172
>If I insert into person but before I insert into short, someone else inserts
>into person, surely my inserts into shirt will have their last Insert_ID()?

Surely you've tried it for yourself.

So, when you run a test scenario to check out what happens ... what happens?

>
>Do you know if this is true only in the same connection context only? Or
>does insert_id() return another connections last insert?
>
>Alan

No other client can change the value that LAST_INSERT_ID() returns
to *you*.  It's designed to solve the very problem about which you
are concerned.
Thread
Inserting Master and Details recordsAlan McDonald16 Oct
  • RE: Inserting Master and Details recordsPeter Lovatt16 Oct
    • RE: Inserting Master and Details recordsAlan McDonald16 Oct
      • Re: Inserting Master and Details recordsMichael T. Babcock16 Oct
      • re: RE: Inserting Master and Details recordsEgor Egorov16 Oct
  • Re: Inserting Master and Details recordsRoger Baklund16 Oct
    • RE: Inserting Master and Details recordsAlan McDonald16 Oct
Re: RE: Inserting Master and Details recordsPaul DuBois16 Oct