How can we set auto increment value of primary key through query
How can we set auto increment value of primary key through query ?
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.
Santhosh Kumar JayaramanPosted Jul 26, 2012, 6:02 AM
Select @key=Isnull(MAX(UseriD),0)+1 from tbl_user
insert into tbl_user values(@key,'username','xxxxx')