您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

oracle怎么查询数据库中的所有表名

2025/12/19 8:18:40发布20次查看
查询方法:1、使用“select * from all_tables where owner = '用户名'”语句,可查询指定用户的所有表名;2、使用“select * from user_tables”语句,可查询当前用户的所有表名。
本教程操作环境:windows7系统、oracle 11g版、dell g3电脑。
oracle 查询数据库中的所有表名
第一种方法
这种方法指定oracle用户名(也就是oracle中的模式)进行查询,把查询条件的 * 换成 table_name 只展示表名
-- dwd为用户名,用户名必须是大写,你填你的用户名select * from all_tables where owner = 'dwd'-- 加 order by table_name 是让结果按照表名顺序展示select * from all_tables where owner = 'dwd' order by table_name
第二种方法
查看当前登录用户(模式)下的表,不用加 owner指定,把查询条件的 * 换成 table_name 只展示表名
select * from user_tables-- 加 order by table_name 是让结果按照表名顺序展示select * from user_tables order by table_name
推荐教程:《oracle教程》
以上就是oracle怎么查询数据库中的所有表名的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product