maheshmehta
IS-IT--Management
Hi Pals
i want to lock a table for a transaction. And within the transaction i have 2 sql statements. One for insert and the other for getting the id of the inserted row.
Eg
Begin transaction
Insert into temp_table values(1,'mahesh')
Select max(id) from temp_table
Commit transactin
What i want is when a user is executing this procedure
no one else could get the same id as this user would get.
Any help would be appreciated.
Mahesh
i want to lock a table for a transaction. And within the transaction i have 2 sql statements. One for insert and the other for getting the id of the inserted row.
Eg
Begin transaction
Insert into temp_table values(1,'mahesh')
Select max(id) from temp_table
Commit transactin
What i want is when a user is executing this procedure
no one else could get the same id as this user would get.
Any help would be appreciated.
Mahesh