Sql server Identity issue

Posted by pranay on Stack Overflow See other posts from Stack Overflow or by pranay
Published on 2010-04-12T12:09:02Z Indexed on 2010/04/12 12:13 UTC
Read the original article Hit count: 153

Filed under:
|
|

I have query like below

declare @str_CustomerID int
Insert into IMDECONP38.[Customer].dbo.CustomerMaster
( CustomerName , CustomerAddress , CustomerEmail , CustomerPhone )
values ( ‘werw12e’ , ‘jkj12kj’ , ‘3212423sdf’ , ‘1212121'
)

select @str_CustomerID= scope_identity()

after execution it returns null in my parameter

i want to get value of identity how can i do that

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server