Saturday, June 1, 2013

[SQL Server] IDENTITY_INSERT, and Using Alphanumeric Autoincrement Primary Key

[SQL Server] IDENTITY_INSERT, and Using Alphanumeric Autoincrement Primary Key


IDENTITY_INSERT, and Using Alphanumeric Autoincrement Primary Key

Posted: 31 May 2013 11:38 PM PDT

Hi Folks,Please help me on below few queries My table is Users(ID IDENTITY(1,1) PRIMARY KEY, NAME nvarchar(10), MANGER_ID fk_User_id References ID)1) now im trying SET IDENTITY_INSERT USERS.ID OFFBut error message i received is 'Cannot find the object 'Users' because it does not exists or you do not have permissions'.2) In case if want my PRIMARY KEY to be alphanumeric as well as autoincrementing. For example the existing values alike 'E1, E2, E3 ans so on.Why I am getting that error? and How to eradicate it?&How to Set our Primary KEY to Alphanumeric AutoIncrementing?

No comments:

Post a Comment

Search This Blog