Get Inserted row automatic id

  • Thread starter Thread starter hoz
  • Start date Start date
H

hoz

Hi ,

I have a table User( Id,Name) , Id is an automatic id .
I have procedure , which gets string parameter as Name and inserts it into
db .How can i return the Id field ?
like
create proc AddUser @name nvarchar(255)
as
insert into User(name) values(@name)
select * from -------
return @@
go
 
Back
Top