This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 在sql server里有一table A, field id 是identity field. 它和其它fields一起组成PK。我想用sql statement 把这个id field改成普通的int field,不知道这sql语句怎么写?另外倒过来,把一int field改成identity field又该如何写呢?
-zxcvb(朝天椒);
2003-7-21
{80}
(#1297369@0)
-
rename the old table, create the new table, copy over the data, delete the old table. Good for all your problems.
-mutantx(阿吉);
2003-7-21
(#1297838@0)
-
嘿, table间的relationship太复杂,我还是手改吧____就是搞不懂其它的条件都可以alter, 为什么这identity不可以?____anyway, 谢谢你的回答。
-zxcvb(朝天椒);
2003-7-22
(#1298293@0)
-
Drop the PK first, and create it after your change
-curtwu(清扬);
2003-7-23
(#1299828@0)