-- 查詢版本 SELECT * FROM v$version; SELECT * FROM product_component_version;
-- 目前資料庫的語系 SELECT * FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET';
-- 查詢目前資料庫名稱 SELECT NAME FROM v$database;
-- 查詢所有 Table SELECT * FROM USER_OBJECTS; SELECT * FROM USER_OBJECTS ORDER BY OBJECT_NAME;
-- 查詢所有 Table & 欄位 SELECT * FROM user_tab_columns ORDER BY TABLE_NAME; SELECT * FROM user_tab_columns WHERE table_name = UPPER('表格名稱') ORDER BY TABLE_NAME;
-- 取得 TABLE 的欄位 desc UPPER('表格名稱');
-- 取得 Table 註解 SELECT table_name, comments FROM sys.user_tab_comments WHERE table_type ='TABLE' AND comments IS NOT NULL ; SELECT table_name, comments FROM sys.user_tab_comments WHERE table_name = UPPER('表格名稱');
-- 取得 Column 註解 SELECT table_name, column_name, comments FROM sys.user_col_comments WHERE comments IS NOT NULL ; SELECT table_name, column_name, comments FROM sys.user_col_comments WHERE table_name = UPPER('表格名稱');
沒有留言:
張貼留言