Oracle 查詢庫表操作

2021-08-30 17:55:00 字數 964 閱讀 3411

查詢所有表名:

select t.table_name from user_tables t;

查詢所有欄位名:

select t.column_name from user_col_comments t;

查詢指定表的所有欄位名:

select t.column_name from user_col_comments t where t.table_name = 'biz_dict_xb';

查詢指定表的所有欄位名和字段說明:

select t.column_name, t.column_name from user_col_comments t where t.table_name = 'biz_dict_xb';

查詢所有表的表名和表說明:

select t.table_name,f.comments from user_tables t inner join user_tab_comments f on t.table_name = f.table_name;

查詢模糊表名的表名和表說明:

select t.table_name from user_tables t where t.table_name like 'biz_dict%';

select t.table_name,f.comments from user_tables t inner join user_tab_comments f on t.table_name = f.table_name where t.table_name like 'biz_dict%';

--查詢表的資料條數、表名、中文表名

select a.num_rows, a.table_name, b.comments

from user_tables a, user_tab_comments b

where a.table_name = b.table_name

order by table_name;

ORACLE操作 查詢表

獲取表字段 select from user tab columns where table name 使用者表 order by column name 獲取表注釋 select from user tab comments where table name 使用者表 order by table...

oracle 查詢表的操作記錄

1,檢視某一時間的執行過的所有sql select t.sql text,t.first load time from v sqlarea t where t.first load time like 2019 01 28 order by t.first load time desc 2019 0...

oracle 查詢表的操作記錄

1.查詢操作表的歷史紀錄 select from v sqlarea a where a.sql text like 表名稱 order by first load time desc 2.從上面的記錄中找到update語句對應的sql id select from v sqltext a,v sq...