极简单的问题 if exists(select 1 from dbo.sysobjects where name='你的表' and type='U') drop table 你的表 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if exists(select 1 from dbo.sysobjects where name='你的表' and type='U') drop table 你的表 if exists(select * from sysobjects where id=object_id('a') and xtype='a') drop table a 上面错误:if exists(select * from sysobjects where id=object_id('a') and xtype='u') drop table a if exists (select * from sysobjects where id = object_id(N'[dbo].[TABLE1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [dbo].[TABLE1] 新的方法:if exists(select table_name from information_schema.tableswhere table_name='employees')drop table employees if exists (select 1 from sysobjects where xtype='u' and status > 1 and name = 'a') drop table a 哦,谢谢大家为什么sqlserver得这么麻烦哪,呵呵 if(object_id('A')is not null) drop table A 判断变量进行update,求最简洁语句 存储过程 我想对3个表的内容进行联合查询 请问怎么办? 高手求救,一个SQL语句~~~~~~~~~~~~~ 怎么设置外键? *********能不能让表的一个字段自增,但是在表清空后自动归零,重新插入数据后,再自增? sql server 2005连接不上本地数据库引擎..求救啊!! 拼接SQL查询条件问题....望大侠解决问题 SQL Server的数据库备份 大家讨论一下数据库设计问题! 这样的sql 怎样写 怎样把已经有数据的表,去掉某个字段的值相同的记录呢?
drop table 你的表
if exists(select * from sysobjects where id=object_id('a') and xtype='a')
drop table a
if exists(select * from sysobjects where id=object_id('a') and xtype='u')
drop table a
drop table [dbo].[TABLE1]
if exists(select table_name from information_schema.tables
where table_name='employees')
drop table employees
drop table a
为什么sqlserver得这么麻烦哪,呵呵
drop table A