请问怎么判断数据库DB1中是否已经存在表TB1? if object_id('TB1') is not null create table tb1.... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if object_id('TB1') is null create table tb1.... if not exists(select * from sysobjects where name='tb1' and xtype='u') create table tb1.... object_id( ) 过程、VIEW、PK等均会返回直 if object_id('TB1') is null create table tb1.... if (select count(*) from sysobjects where name='tb1' and xtype='u')<=0 create table tb1.... Use DB1if not exists (select * from dbo.sysobjects where id = object_id(N'[TB1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) Create table TB1.... 啊,迟到了。可能的方法都让人给说了。我没有什么好说的了。ANGEL的方法不错。应该是最完备的。 if exists(select 1 from sysobjects where object_id('table_name') is not null and type = 'u')drop table tablenamegocreate table tablename...... 关于pivot函数的简单用法 同样方法导出的2个包,为何.bas报:指定的文件不是包存储文件。.dts却没有问题 SQL的递归查询 sql serverl连接与服务问题 关于整理索引后查询效率的问题[在线等] 急急急,本地调试出错 标准版成功执行的作业,企业版不能运行!高手来! SQL xp_cmdshell xcopy 跨服务器拷贝 问题 象以下的错误能知道到为什么吗? 在ado编程中怎样纪录错误日至?? 数据库的加锁问题 *****高分求助!!!*****在表里面的一列可以达到这样的效果吗?每增加一条记录,这列的值会自动加一?谢谢
create table tb1....
create table tb1....
if not exists (select * from dbo.sysobjects where id = object_id(N'[TB1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
Create table TB1....
and type = 'u')
drop table tablename
go
create table tablename
......