Oracle table select
ORACLE匯出資料庫所有表結構為EXCEL檔案(只需要把資料庫名改為對應的資料庫即可,需要單個的話,在Where中加入atc.table_name為單表即可):
SELECT DISTINCT
atc.table_name AS "表名"
,atcom.comments AS "表註釋"
,atc.column_id AS "欄位序號"
,atc.column_name AS "欄位名"
,atc.data_type AS "欄位型別"
,atc.data_scale AS "欄位精度"
,atc.data_length AS "欄位長度"
,acc.comments AS "欄位註釋"
,allt.num_rows as "表資料量"
FROM
all_tab_columns atc
INNER join all_col_comments acc ON atc.table_name = acc.table_name AND atc.owner = acc.owner AND atc.column_name = acc.column_name
INNER join all_tab_comments atcom ON atc.table_name = atcom.table_name AND atcom.owner = acc.owner AND atcom.table_type = 'TABLE'
INNER join all_tables allt on atc.table_name = allt.table_name AND atc.owner = allt.owner
WHERE
atc.owner = '資料庫名'
ORDER BY
atc.table_name,
atc.column_id;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23757700/viewspace-2896840/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Create Table as SelectOracle
- oracle 10046與select table查詢表系列(一)Oracle
- sqlserver不能直接create table as select ......SQLServer
- CREATE TABLE AS SELECT(CAST)(二)-ConceptAST
- Bootstrap select2 ,table, 清空表單formbootORM
- 【MySQL】select for update 的Row Lock 與Table LockMySql
- CREATE TABLE AS SELECT(CAST)(一)-ORA-1652AST
- [Oracle] Partition table exchange Heap tableOracle
- 關於 mysql 中的 select * from table_a,table_b 的問題MySql
- oracle select for updateOracle
- oracle temporary tableOracle
- oracle shrink tableOracle
- Oracle Table LocksOracle
- Alter table for ORACLEOracle
- Oracle Table FunctionOracleFunction
- Oracle 普通table 轉換為partition tableOracle
- oracle cache table(轉)Oracle
- Oracle:TABLE MONITORINGOracle
- oracle之nalyze tableOracle
- Oracle ASM Allocation TableOracleASM
- oracle cache table(1)Oracle
- oracle cache table(3)Oracle
- oracle cache table(2)Oracle
- oracle cache table(5)Oracle
- oracle cache table(4)Oracle
- oracle cache table(6)Oracle
- Bug 9369183 - ORA-32349 creating MView on prebuilt table using select from remote tableViewUIREM
- insert into select 與 create table as的用法和區別(轉)
- [Oracle Script] select db parameterOracle
- Oracle -- 深入體會PLAN_TABLE、PLAN_TABLE$Oracle
- Oracle --- PLAN_TABLE$和PLAN_TABLE區別Oracle
- Oracle ASM Partnership and Status TableOracleASM
- Oracle ASM Free Space TableOracleASM
- Oracle Table and tablespace CompressOracle
- oracle alter table詳解Oracle
- Oracle 基本操作之 tableOracle
- oracle 外部表 external tableOracle
- Oracle外部表 External TableOracle