怎么查询一个table是不是这个库里面的

cryingboy 2003-04-09 05:15:13
rt!!!
...全文
68 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
pengdali 2003-04-09
  • 打赏
  • 举报
回复
if exists(select 1 from sysobjects where xtype='u' and name='表名')
select 1
else
select 2
Chiff 2003-04-09
  • 打赏
  • 举报
回复
select * from databasename..sysobjects where name = tablename and xtype = 'U'

22,300

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧