Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Returning last row inserted

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-09 : 08:27:02
Nigel writes "When inserting into a table with an identity column you need to retrieve the row is this how it is done?

insert into XXX (aaa,bbb) values (1,2)
select @pkcXXX = select pkcXXX from XXX

is so is this documented somewhere as I cannot find it

Thanks"
   

- Advertisement -