解决方法:
①.、dba_tables(在dba权限下可查) ?SQL conn / as sysdba ?Connected.
SQL select count(*) from dba_tables where owner='TEST';
COUNT(*)
注:表名以及各详细内容可以通过desc dba_tables查看相应字段,在查询相应内容.
SQL select count(*) from all_tables where owner='TEST';
SQL
注:表名以及各详细内容可以通过desc all_tables查看相应字段,在查询相应内容.
SQL select count(*) from user_tables;
SQL conn matchhr/matchhr ?Connected.
注:表名以及各详细内容可以通过desc user_tables查看相应字段,在查询相应内容.
方法和详细的操作步骤如下:
①.、第一步,
MySQL数据库使用特定字段查询所有表名,代码见下图,转到下面的步骤.
select * from all_tab_comments -- 查询所有用户的表,视图等.
select * from user_tab_comments -- 查询本用户的表,视图等.
select * from all_col_comments? --查询所有用户的表的列名和注释.
select * from user_col_comments -- 查询本用户的表的列名和注释.
select * from all_tab_columns --查询所有用户的表的列名等信息.
select * from user_tab_columns --查询本用户的表的列名等信息.
扩展资料
ORACLE下有三个视图
DBA_TABLES? 拥有DBA角色的用户可以查看系统中的所有表
USER_TABLES 登录数据库的当前用户拥有的所有表
ALL_TABLES 登录数据库的当前用户有权限查看的所有表
参考资料:百度百科-Oracle
①.、查找表的所有索引(包括索引名,类型,构成列):
select
t.*,i.index_type
from
user_ind_columns
t,user_indexes
i
where
t.index_name
=
i.index_name
and
t.table_name
i.table_name
要查询的表
cu.*
user_cons_columns
cu,
user_constraints
au
cu.constraint_name
au.constraint_name
au.constraint_type
'P'
au.table_name
column_name
'U'
*
c
c.constraint_type
'R'
c.table_name
查询外键约束的列名:
cl
cl.constraint_name
外键名称
查询引用表的键的列名:
外键引用表的键名
①.、首先,打开并登陆plsql.
以上就是土嘎嘎小编为大家整理的oracle怎么看表名相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!