Hi
i need to insert a record from my asp.net frontend using stored procedure in Sql server database.
there is a table called Customer
fields are customerID,CustomerName
now through stored procedure i need to insert customername and customerID is must be autogenerated
like
CustomerID CustomerName
1 ABC
2 DEF
3 XYZ
is there any way to do this
iwas trying to do like this
Code:create proc trest (@fname varchar(50)="x", @x int) as select max(id) as nid from register set x=nid+1 insert into login (id,firstname)values(@x,@fname)





Reply With Quote