社区
MS-SQL Server
帖子详情
如何用sql语句获得此数据库下的所有表?
chendd2001
2003-05-07 01:59:50
如何用sql语句获得此数据库下的所有表?
...全文
111
7
打赏
收藏
如何用sql语句获得此数据库下的所有表?
如何用sql语句获得此数据库下的所有表?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
mjhnet
2003-05-08
打赏
举报
回复
exec sp_tables
还会返回系统表
erigido
2003-05-07
打赏
举报
回复
exec sp_tables
ldcr520
2003-05-07
打赏
举报
回复
select name from sysobjects where type='U'
sp_tables
joygxd
2003-05-07
打赏
举报
回复
select name from sysobjects where xtype='u' and status>0
CrazyFor
2003-05-07
打赏
举报
回复
exec sp_tables
mjhnet
2003-05-07
打赏
举报
回复
select name from sysobjects where type='U'
就是会多一个dtproperties表
最好
select name from sysobjects where type='U' and name<>='dtproperties'
saucer
2003-05-07
打赏
举报
回复
select name from sysobjects where type='U'
in 2000, you could also do
select table_name from INFORMATION_SCHEMA.TABLES where table_type = 'BASE TABLE'
如何
获得
Sybase中的
数据库
、
表
名、字段的
SQL语句
1.
获得
Sybase中所有
数据库
: select dbid,name from master..sysdatabases 2.
获得
指定
数据库
中的
表
列
表
:select name from
数据库
..sysobjects where type='U' order by name 3.
获得
指定
数据库
中的视图列
表
:select name from
数据库
..sysobjects where typ...
获得
数据库
名称///////查询
数据库
里所有
表
的
sql语句
!
select name as 库名 from master..sysdatabases where dbid>=7
获得
数据库
名称select * from sysobjects where xtype=u or xtype=v 查询
数据库
里所有
表
的
sql语句
!select name from sysobjects where type=u 查询一个
统计MySQL中某个
数据库
中有多少张
表
[code="shell"] mysql> SELECT count(*) TABLES, table_schema FROM information_schema.TABLES where table_schema = 'db_production' GROUP BY table_schema; +--------+-------------------+ | TABLES | tab...
SQL Server 里面
获得
数据库
表
名称、列名称等查询语句
--1:获取当前
数据库
中的所有用户
表
select Name from sysobjects where xtype='u' and status>=0 --2:获取某一个
表
的所有字段 select name from syscolumns where id=object_id(N'
表
名') --3:查看与某一个
表
相关的视图、存储过程、函数 select a.* from sysobje
MS-SQL Server
34,875
社区成员
254,639
社区内容
发帖
与我相关
我的任务
MS-SQL Server
MS-SQL Server相关内容讨论专区
复制链接
扫一扫
分享
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章