Re: Getting result of odbc's INSERT INTO command
- From: Joe <joerider@xxxxxxxxx>
- Date: Sun, 24 Apr 2005 12:15:09 +0200
Severian [MVP] wrote:
BEGIN TRANSACTION INSERT INTO... SELECT MAX(id) FROM table END TRANSACTION
I found something about SELECT @@IDENTITY
What is your opinion about that?
Not sure, but AFAIK it's not standard SQL. It may be an extension in one or more databases.
My problem is that other clients could add records in the meantime. My module is using only one connection to serve multiple clients. So I can use a lock.
The Select MAX(id) in this case seems dangerous to me.
Joe .
- Follow-Ups:
- Re: Getting result of odbc's INSERT INTO command
- From: Severian [MVP]
- Re: Getting result of odbc's INSERT INTO command
- From: Mark Randall
- Re: Getting result of odbc's INSERT INTO command
- References:
- Getting result of odbc's INSERT INTO command
- From: Joe
- Re: Getting result of odbc's INSERT INTO command
- From: Severian [MVP]
- Re: Getting result of odbc's INSERT INTO command
- From: Joe
- Re: Getting result of odbc's INSERT INTO command
- From: Severian [MVP]
- Getting result of odbc's INSERT INTO command
- Prev by Date: Re: Getting result of odbc's INSERT INTO command
- Next by Date: Re: Why not top posting?
- Previous by thread: Re: Getting result of odbc's INSERT INTO command
- Next by thread: Re: Getting result of odbc's INSERT INTO command
- Index(es):
Relevant Pages
|