如何利用SQL语句查询数据库中所有表的名称?

yinzs 2008-07-28 06:40:55
如何利用SQL语句查询数据库中所有表的名称?
有没有这种语句?
...全文
14178 28 打赏 收藏 转发到动态 举报
写回复
用AI写文章
28 条回复
切换为时间正序
请发表友善的回复…
发表回复
一路遥遥 2012-07-16
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'为什么说找不到database?菜鸟了
junyao100 2010-04-13
  • 打赏
  • 举报
回复
不错……………………回帖,加分
hai521 2009-04-14
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
germliucaixia 2008-07-31
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
wgzaaa 2008-07-31
  • 打赏
  • 举报
回复
--用这个也是可以的,但不如前面大多数人提到的简单:sp_tables @table_type ='''TABLE'''
--只取表名
create table #a(a varchar(50),b varchar(50),c varchar(100),d varchar(50),e varchar(50))
insert #A exec sp_tables @table_type ='''TABLE'''
select c name from #a
LIHY70 2008-07-30
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
mskyp 2008-07-30
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
kofken 2008-07-30
  • 打赏
  • 举报
回复

select name from sysobjects where type='U'
ivan_ren 2008-07-29
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
sydee 2008-07-29
  • 打赏
  • 举报
回复
select * from sysobjects
cxmcxm 2008-07-29
  • 打赏
  • 举报
回复
select * from sysobjects where type='U'


ws_hgo 2008-07-29
  • 打赏
  • 举报
回复
select * from sys.objects where xtype ='U'
三下鱼 2008-07-29
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
hyde100 2008-07-29
  • 打赏
  • 举报
回复
select * from sys.objects where type ='U'
tongxinfeixiang 2008-07-29
  • 打赏
  • 举报
回复
select * from sysobjects where xtype = 'u'
linguojin11 2008-07-29
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 roy_88 的回复:]
SQL codeuse test--數據庫名
go
select * from sysobjects where xtype='U'
[/Quote]
rhq12345 2008-07-29
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
cxmcxm 2008-07-28
  • 打赏
  • 举报
回复
select * from sysobjects where type='U'
fcuandy 2008-07-28
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 roy_88 的回复:]
SQL codeuse test--數據庫名
go
select * from sysobjects where xtype='U'
[/Quote]
水族杰纶 2008-07-28
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 lgxyz 的回复:]
SQL codeselect * from sysobjects where xtype='U'
[/Quote]
加载更多回复(8)

34,575

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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