Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Problem with SQL!!


Message #1 by "George Theodorakopoulos" <gtheo@e...> on Thu, 28 Jun 2001 16:55:01 +0300
Not necessarily:

User 1 Inserts Record
User 2 Inserts Record
User 1 issues SELECT MAX(ID)

uh-oh - you've got the wrong ID now...

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Chun Le" <Chun.Le@p...>
To: "sql language" <sql_language@p...>
Sent: Friday, June 29, 2001 12:41 AM
Subject: [sql_language] RE: Problem with SQL!!


: one way is to use MAX keyward.
: select MAX (rec id) from......
: that will return the last record you just created.
:
: > ----------
: > From: George Theodorakopoulos[SMTP:gtheo@e...]
: > Reply To: sql language
: > Sent: Thursday, June 28, 2001 7:41 AM
: > To: sql language
: > Subject: [sql_language] Problem with SQL!!
: >
: >
: > SQL question:
: > Suppose that I insert (by using an INSERT...VALUES statement) a new
record
: > in a table that
: > has an autoincrement field.
: > How can I retrieve the value of this field for the newly inserted
record?
: >
: > thanks a lot!!!!!!!!!!



  Return to Index