2012年12月8日

对数据表添加新列到指定位置

摘要: 首先:--创建测试环境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 syscolumnsset colid=colid+1where colid>=2 and id=object_id('test' 阅读全文

posted @ 2012-12-08 15:53 幻林的地盘 阅读(283) 评论(0) 推荐(0) 编辑

导航