oracle 資料庫表結構查詢

2021-09-30 10:12:07 字數 773 閱讀 2310

oracle查詢使用者所有表的語句

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:

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資料庫入門 查詢表及表結構

獲取表 select table name from user tables 當前使用者的表 select table name from all tables 所有使用者的表 select table name from dba tables 包括系統表 select table name fro...

oracle資料庫員工表查詢

孟子辰 2016 11 28 10 13 1 請從表emp中查詢工種是職員clerk或經理manager的雇員姓名 工資。select ename,sal from emp where job clerk or job manager 2 請在emp表中查詢部門號在10 30之間的雇員的姓名 部門號...

資料庫 oracle查詢表資訊

修改資料庫中一張表指定欄位的資料,該字段在其他表中也存在,需要同步修改 此時需要統計資料庫中所有包含該字段的表。獲取表字段 select from user tab columns where table name 使用者表 獲取表注釋 select from user tab comments w...