I have table in a DB and the primary key is the 'TID' column, and I want to make it as AUTOINCREMENT, but I can't, because the "Identity specification" is turned off!
See this picture: http://www.rofof.com/img2/6xsbuy6.gif
How can I do it?
Thanks!
I have table in a DB and the primary key is the 'TID' column, and I want to make it as AUTOINCREMENT, but I can't, because the "Identity specification" is turned off!
See this picture: http://www.rofof.com/img2/6xsbuy6.gif
How can I do it?
Thanks!
You need to make it an int column or other number type rather than an nchar column. I suspect nchar(10) is the wrong type for your other columns as well: you probably want nvarchar columns for your name fields and you'll want to allow space for a little more than 10 characters.
You're trying to set a value for the ID column yourself. When you use autoincrement columns, you don't put the ID column in your insert statement at all.
please where are you ?
how can I set IDENTITY_INSERT to ON? see this please: rofof.com/img2/6amojc6.gif