Oracle ALL DBA表
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
--查询本用户的表的列名等信息(详细但是没有备注).
--一般使用1: www.2cto.com
select t.table_name,t.comments from user_tab_comments t
--一般使用2:
select r1, r2, r3, r5
from (select a.table_name r1, a.column_name r2, a.comments r3
from user_col_comments a),
(select t.table_name r4, t.comments r5 from user_tab_comments t)
where r4 = r1
以上就是oracle查询用户所有表的语句介绍。
如何在oracle中查询所有用户表的表名、主键名称、索引、外键等
1、查找表的所有索引(包括索引名,类型,构成列):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 = 要查询的表
2、查找表的主键(包括名称,构成列): 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 = 要查询的表
3、查找表的唯一性约束(包括名称,构成列):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 = 要查询的表
4、查找表的外键(包括名称,引用表的表名和对应的键名,下面是分成多步查询):
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 = 外键引用表的键名
5、查询表的所有列及其属性 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 * from dba_tables;
select * from all_tab_comments a where a.TABLE_NAME like 'HZ%ERR%';
Oracle ALL DBA表的更多相关文章
- oracle学习之表空间
一.oracle当中的dual表 注意:sql语句一定要有一个 : 结尾,不然会报错. Oracle数据库内种特殊表DualDual表Oracle实际存表任何用户均读取用没目标表SelectDual表 ...
- oracle查询锁表解锁语句
--oracle查询锁表解锁语句--首先要用dba权限的用户登录,建议用system,然后直接看sql吧 --1. 如下语句 查询锁定的表: SELECT l.session_id sid, s.se ...
- Oracle Applications DBA 基础(一)
1.引子 2014年9月13日 20:33 <oracle Applications DBA 基础>介绍Oracle Applications R12的系统架构, 数据库后台及应用系统的基 ...
- Oracle查询数据表结构(字段,类型,大小,备注)
作用:想要生成整个Oracle数据库所有表结构WORD文档(数据库设计说明书) Oracle数据库字典介绍 Oracle数据字典是有表和视图组成的,存储有关数据库结构信息的一些数据库对象.数据库 ...
- oracle系統表、數據字典介紹與日常問題診斷
oracle系統表.數據字典介紹與日常問題診斷 數據字典是由唯讀的table和view組成的,產生於$oracle_home\rdbms\admin\catalog.sql.裡面儲存Oracle資料庫 ...
- Oracle 删除用户和表空间////Oracle创建删除用户、角色、表空间、导入导出、...命令总结/////Oracle数据库创建表空间及为用户指定表空间
Oracle 使用时间长了, 新增了许多user 和tablespace. 需要清理一下 对于单个user和tablespace 来说, 可以使用如下命令来完成. 步骤一: 删除user drop ...
- oracle基本建表语句
oracle基本建表语句 2010-09-20 10:37:33| 分类: 数据库 | 标签:数据库 oracle |字号 订阅 --创建用户create user han identifie ...
- (转)Oracle数据库DBA必备基本技能
[Oracle数据库DBA必备基本技能] shutdown Normal 需要等待所有的用户断开连接 Immediate 等待用户完成当前的语句 Transactional 等待用户完成当前的事 ...
- Oracle 的DBA考证
转自 :https://www.cnblogs.com/chunge2050/archive/2013/04/16/3023730.html 详细的了解了几天之后,总结起来就是oracle为DBA认证 ...
随机推荐
- Architecture of a Java Compiler
Architectural Overview A modern optimizing compiler can be logically divided into four parts: Th ...
- 常用CSS实例
为表格设置合并边框模型: border-collapse:collapse 规定单元格之间的空间: cellspacing:0 规定内侧边框的哪个部分是可见的: rules:all
- #pragma的一些用法
1.#pragma message message 参数:Message参数能够在编译信息输出窗口输出相应的信息,这对于源代码的信息控制特别重要,其使用方法为: #pragma message(&qu ...
- 问题记录 | VScode中使用IntelliJ的快捷键
问题记录 | VScode中使用IntelliJ的快捷键 主要想用ctrl+alt+l格式化Python代码 安装VScode的插件:IntelliJ IDEA Keybindings 安装方法: I ...
- MySQL查询表结构的SQL语句
desc 数据库.表名; eg: desc mysql.user;
- windows端口查看及进程查找
1. 使用netstat查看端口 netstat -ano 2. 查找特定端口号: netstat -aon|findstr "port" 3. 查找该端口的进程 tasklist ...
- Swift基础语法之变量函数
import Foundation //变量声明使用 //使用 let 来声明常量,使用 var 来声明变量 常量只能为它赋值一次 let name="cuiyw"; var ag ...
- Percona-mysql server 5.5升级5.6
http://blog.csdn.net/lqx0405/article/details/50162557 系统环境: 操作系统:CentOS_6.5(64) My ...
- [转]How to nest transactions nicely - "begin transaction" vs "save transaction" and SQL Server
本文转自:http://geekswithblogs.net/bbiales/archive/2012/03/15/how-to-nest-transactions-nicely---quotbegi ...
- sql中根据逗号分隔,查出多行数据
--sql中根据逗号分隔,查出多行数据 select a.DiscussID,b.LocationID from (select DiscussID,LocationID=c ...