Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
biz
Starting Member
4 Posts |
Posted - 2008-12-02 : 03:38:42
|
i have a query in ms-sql server2000can we convert ID numeric(18,0) to identity(1,1) which will be primary key ,since this ID numeric(18,0) is a foreign key in another table so i wanted that this key should be as primary auto incrementing key whereas i am also unable to do insert into statement for the sameerror ocuuring is as : Cannot insert explicit value for identity column in table Can you please help me out. |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-12-02 : 03:58:14
|
An identity is a column that gets automatically assigned. You don't insert into it. If you want to specify values for the PK, remove the identity property from the column.--Gail ShawSQL Server MVP |
|
|
|
|
|