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

原来的表新增物理列,速度。解决方案

2012-03-18 
原来的表新增物理列,速度。表Acol01 , col02ifnotexists(selectnamefromsyscolumnswhereid object_id(M11

原来的表新增物理列,速度。
表A
col01 , col02


if not exists (select name from syscolumns where id= object_id('M1112') and name= 'Col003') 
加入列 Col003


 表A
col01 , col02 , col03
 

[解决办法]
if not exists (select name from syscolumns where id= object_id('M1112') and name= 'Col003') 
begin
alter table M1112 add Col003 varchar(20);
end
[解决办法]
+1

探讨
if not exists (select name from syscolumns where id= object_id('M1112') and name= 'Col003')
begin
alter table M1112 add Col003 varchar(20);
end

[解决办法]
SQL code
alter table tbname add colname int/varchar/... 

热点排行
Bad Request.