网站首页 > 文章中心 > 其它

oracle怎么查整个表

作者:小编 更新时间:2023-09-01 14:26:10 浏览量:470人看过

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 and t.table_name = 要查询的表

select cu.* from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'P' and au.table_name = 要查询的表

select column_name from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'U' and au.table_name = 要查询的表

select * from user_constraints c where c.constraint_type = 'R' and c.table_name = 要查询的表

查询外键约束的列名:

select * from user_cons_columns cl where cl.constraint_name = 外键名称

查询引用表的键的列名:

select * from user_cons_columns cl where cl.constraint_name = 外键引用表的键名

select t.*,c.COMMENTS from user_tab_columns t,user_col_comments c where t.table_name = c.table_name and t.column_name = c.column_name and t.table_name = 要查询的表

select table_name,num_rows from user_tables;

select * from all_users;

select * from dba_users

①.0、Oracle查看当前用户连接:select * from v$Session

①.1、Oracle查看当前用户权限:select * from session_privs

select a.file_id "FileNo",a.tablespace_name

"Tablespace_name",

a.bytes "Bytes",a.bytes-sum(nvl(b.bytes,0)) "Used",

sum(nvl(b.bytes,0)) "Free",

sum(nvl(b.bytes,0))/a.bytes*100 "%free"

from dba_data_files a, dba_free_space b

where a.file_id=b.file_id(+)

group by a.tablespace_name ,

a.file_id,a.bytes order by a.tablespace_name;

Oracle中怎样查看所有的表,列,属性,主键等信息

①.、首先开启Oracle管理工具,找到Tablespaces.

如何查看oracle数据库中的所有表

①.、查询用户创建的所有表:

select * from user_tables;

select * from all_all_tables;

oracle 怎样查询某用户下的所有表的表名

①.、首先在计算机中,打开Oracle的连接程序,用新建的数据库管理员,进入【Oracle控制】的窗口上,鼠标左键单击【服务器】按钮,并选择【SQL工作表】.

请问oracle怎么查看所有的表啊?

执行sql语句:select TABLE_NAME from all_tables;

查看当前库的所有数据表名全部出来

以上就是土嘎嘎小编为大家整理的oracle怎么查整个表相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!

版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载、或以其他方式使用本站《原创》内容,违者将追究其法律责任。本站文章内容,部分图片来源于网络,如有侵权,请联系我们修改或者删除处理。

编辑推荐

热门文章