首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

在指定的位置平添列

2012-07-27 
在指定的位置添加列--允许系统标更新exec sp_configure allow updates,1goreconfigure with overrideg

在指定的位置添加列

--允许系统标更新exec sp_configure 'allow updates','1'goreconfigure with overridego----添加列ALTER TABLE dbo.GoodsPrinter ADD GoodsStallId NVARCHAR(100)--把第一列之后的列往后移1(colid从1开始)update syscolumns set colid=colid+1 where colid>=2 and id = object_id('GoodsPrinter')--更新列顺序update syscolumns set colid=2 where name='GoodsStallId' and id=object_id('GoodsPrinter')--禁用系统标更新exec sp_configure 'allow updates','0'goreconfigure with overrideGO

?

热点排行