--来由/* 现有一张表TEST(A,B,C)怎样在A和B列之间插入新列D希望结果:TEST(A,D,B,C)vivianfdlpw 2005.9 引用请保留此信息*/--创建测试环境create table TEST(A varchar(20),B varchar(20),C varchar(20))go--允许系统标更新exec sp_configure 'allow updates','1'goreconfigure with overridego--添加D列alter table test add D varchar(10)--更新B,C列顺序update syscolumns set colid=colid+1where colid>=2 and id=object_id('test')--更新D列顺序update syscolumns set colid=2where name='D' and id=object_id('test')--禁用系统标更新exec sp_configure 'allow updates','0'goreconfigure with overridego