add一列

Posted 997icu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了add一列相关的知识,希望对你有一定的参考价值。

if not exists(select * from sys.columns where [object_id] = object_id(‘szydytglhyytb‘) and name = ‘SZYDYTGLHYYTB_HYBM‘)
BEGIN
alter table szydytglhyytb add SZYDYTGLHYYTB_HYBM varchar(64) NULL;
END
GO
if not exists(select * from sys.columns where [object_id] = object_id(‘szydytglhyytb‘) and name = ‘SZYDYTGLHYYTB_HYNM‘)
BEGIN
alter table szydytglhyytb add SZYDYTGLHYYTB_HYNM varchar(36) NULL;
END
GO
if not exists(select * from sys.columns where [object_id] = object_id(‘szydytglhyytb‘) and name = ‘SZYDYTGLHYYTB_HYMC‘)
BEGIN
alter table szydytglhyytb add SZYDYTGLHYYTB_HYMC varchar(4000) NULL;
END
GO

以上是关于add一列的主要内容,如果未能解决你的问题,请参考以下文章