-- 查看ORACLE 數據庫中本用戶下的所有表
SELECT table_name FROM user_tables;
-- 查看ORACLE 數據庫中所有用戶下的所有表
select user,table_name from all_tables;
-- 查看ORACLE 數據庫中本用戶下的所有列
select table_name,column_name from user_tab_columns;
-- 查看ORACLE 數據庫中本用戶下的所有列
select user,table_name,column_name from all_tab_columns;
顯示數據庫中所有的用戶列,查詢結果包括所屬表明,列名,類型,和comments
select a.TABLE_NAME,a.COLUMN_NAME,a.COMMENTS from user_col_comments a,user_col_comments b where a.TABLE_NAME=b.TABLE_NAME and a.COLUMN_NAME=b.COLUMN_NAME;
--查看錶結構的創建時間和最後修改時間
SELECT a.owner, a.table_name, created, last_ddl_time
FROM dba_tables a, SYS.dba_objects b
WHERE a.tablespace_name = 'tablespace_name '
AND a.owner = b.owner
AND a.table_name = b.object_name
AND object_type = 'TABLE'