Auto Incriment
How to Incriment EmpId Column Value Automatically in winforms using C#.net source code?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Krishna GaradPosted Apr 1, 2011, 5:59 AM
Declare @empid int
Set @empid=(Select Max(EmpId+1) From TableName)
now use this @empid for insert statement.
Suthish NairPosted Apr 1, 2011, 3:24 PM