怎样用一条语句查出数据库中所有用户表的表名

xiejy100 2003-08-30 09:40:00
在SQL SERVER 2000中,我想用一条语句查出一个数据库下面的所用用户表的表名,然后生成记录集,如何实现,请大虾指教,谢谢
...全文
102 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
scottgao 2003-08-31
  • 打赏
  • 举报
回复
status保留。仅限内部使用。据查,xtype字段值为U的记录仅有name值为dtproperties的status值为负。为什么这样,请哪位大吓告知。
lionstar 2003-08-30
  • 打赏
  • 举报
回复
select * from sysobjects where type='U'

开心就好!!!!
yczzg 2003-08-30
  • 打赏
  • 举报
回复
select * from INFORMATION_SCHEMA.TABLES where table_type='BASE TABLE'
yczzg 2003-08-30
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U'
pengdali 2003-08-30
  • 打赏
  • 举报
回复
sp_tables
select * from INFORMATION_SCHEMA.TABLES
pengdali 2003-08-30
  • 打赏
  • 举报
回复
select * from sysobjects where xtype='U' and status>0
johnshen0211 2003-08-30
  • 打赏
  • 举报
回复
我试过了:
1。select count(*) from sysobjects where xtype='U' and status>0
2。select count(*) from sysobjects where xtype='U'

我这里得到的结果分别是37和38

想请问status表示的是什么呢?

wanghan226 2003-08-30
  • 打赏
  • 举报
回复
select * from sysobjects where type like 'U%'

27,579

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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