27,579
社区成员
发帖
与我相关
我的任务
分享
IF OBJECT_ID('tb') IS NOT NULL
ALTER TABLE tb ALTER COLUMN col NVARCHAR(20)
ELSE
CREATE TABLE TB(col NVARCHAR(20))
IF OBJECT_ID('tb') IS NOT NULL
ALTER TABLE tb ALTER COLUMN col NVARCHAR(20)
ELSE
CREATE TABLE TB(col NVARCHAR(20))
if object_id('表') is not null
alter table 表..
if object_id('表') is null
create table 表
if object_id('表') is not null
drop table 表
if exists ( SELECT * FROM sys.objects WHERE [object_id] = OBJECT_ID('tb') AND type='u')
begin
alter table tb......
end
else
begin
create table tb......
end
if object_id('tableName') is null
create table tableName(id int)
else if object_id('tableName') not is null
alter table ---
go
if object_id('tableName') is null
create table tableName(id int)
go
等高手