摘要:
IF exists (select * from syscolumns where name='字段名' and id=object_id('表名')) begin select '已存在,不需添加!' end ELSE begin ALTER TABLE dbo.表名 add 字段名 VARCHAR(36) EXEC sys.sp_addextendedprope... 阅读全文
摘要:
IF NOT EXISTS ( SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[表名]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1 ) begin SELECT '不存在... 阅读全文