2014년 6월 23일 월요일

Table Description SQL...[ORACLE/SQL/HINT/오라클/교육/강의/강좌/SQL교육/오라클 PLSQL/강의/강좌/오라클교육/ORACLE초보교육/오라클실무강좌]


-- 
-- tabdesc.sql 
-- 
set heading on 
set verify on 
set pagesize 60 
set newpage 0 
ttitle 'Table Description - Space Definition' 
spool tabdesc.lst 
set heading on 
set verify off 
column ts format a30 
column ow format a30 
column ta format a30 
column clu format a30 
column pcf format 99999999999990 
column pcu format 99999999999990 
column int format 99,999,999,990 
column mat format 99,999,999,990 
column inx format 99,999,999,990 
column nxt format 99,999,999,990 
column mix format 99,999,999,990 
column max format 99,999,999,990 
column pci format 99999999999990 
column num format 99,999,999,990 
column blo format 99,999,999,990 
column emp format 99,999,999,990 
column avg format 99,999,999,990 
column cha format 99,999,999,990 
column rln format 99,999,999,990 
column hdg format a30 newline 
set heading off 
select 'Table Name' hdg, TABLE_NAME ta, 
'Owner Name' hdg, OWNER ow, 
'Tablespace Name' hdg, TABLESPACE_NAME ts, 
'PCT_FREE' hdg, PCT_FREE pcf, 
'PCT_USED ' hdg, PCT_USED pcu, 
'Initial Extent (K)' hdg,            INITIAL_EXTENT/1024 inx, 
'Next Extent (K)' hdg, NEXT_EXTENT/1024 nxt, 
'PCT_INCREASE' hdg, PCT_INCREASE pci, 
'Number of Rows' hdg, NUM_ROWS num, 
'Number of Blocks' hdg, BLOCKS blo, 
'Number of Empty Blocks' hdg, EMPTY_BLOCKS emp, 
'Average Space' hdg, AVG_SPACE avg, 
'Average Row Length' hdg, AVG_ROW_LEN rln 
from dba_tables 
where owner not in ('SYSTEM', 'SYS') 

set heading on 
set embedded off 
break on tn skip 1 
column tn format a20 heading 'Table Name' 
column cn format a20 heading 'Column Name' 
column fo format a15 heading 'Type' 
column nu format a8 heading 'Null' 
ttitle 'Table Description - Column Definition' 
select table_name tn, 
COLUMN_NAME cn, 
      DATA_TYPE || 
decode(DATA_TYPE, 
'NUMBER', 
'('||to_char(DATA_PRECISION)|| 
decode(DATA_SCALE,0,'',','||to_char(DATA_SCALE))||')', 
'VARCHAR2', 
  '('||to_char(DATA_LENGTH)||')', 
'CHAR', 
  '('||to_char(DATA_LENGTH)||')', 
'DATE','', 
'Error') fo, 
decode(NULLABLE,'Y','','NOT NULL') nu 
FROM user_tab_columns 
order by table_name,COLUMN_ID 

exit 


  
  
Previous Article : Index의 Extents 확인 SQL...  
Next Article : Table에 걸린 DeadLock 확인 SQL...  


-------------------------------------------------------------------------------- 
  

오라클자바커뮤니티교육센터, 개발자전문교육, 개인80%환급 
www.oraclejavacommunity.com


평일주간(9:30~18:10) 개강
(6/30)[기업100%환급]PL/SQL,ORACLE HINT,TUNING
(6/30)[기업100%환급]안드로이드개발자과정
(6/30)[기업100%환급]SQL기초에서 Schema Object까지
(7/07)[기업100%환급]C#4.0,WinForm,ADO.NET프로그래밍
(7/07)[기업100%환급]Spring ,MyBatis,Hibernate실무과정
(7/07)[기업100%환급]자바기초에서 JDBC, Servlet/JSP까지 
(7/07)[채용예정교육]오라클자바개발잘하는신입뽑기프로젝트,교육전취업확정

평일야간(19:00~21:50) 개강
(6/24)Spring3.X, MyBatis, Hibernate실무과정
(6/26)SQL초보에서실전전문가까지
(7/01)안드로이드개발자과정
(7/01)닷넷(C#,Network,ADO.NET,ASP.NET)마스터과정
(7/02)자바웹(JSP,Spring,MyBatis,XPlatform)프로젝트과정
(7/02)JAVA,Network&WEB&Framework(자바기초에서웹스프링까지)
(7/03)웹퍼블리싱 마스터
(7/15)MyBatis3.X, Hibernate4.X ORM실무과정
(7/22)자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBatis까지

주말(10:00~17:50) 개강
(6/28)Spring3.X, MyBatis, Hibernate실무과정
(6/28)안드로이드개발자과정
(6/28)실무예제로 배워보는 jQuery(개발자/디자이너를위한)
(6/28)자바기초에서JSP,Ajax,jQuery,Spring3.2,MyBatis까지
(7/05)SQL초보에서 Schema Object까지
(7/12)자바웹(JSP,Spring,MyBatis,XPlatform)프로젝트과정
(7/12)MyBatis3.X, Hibernate4.X ORM실무과정
(7/12)개발자를위한PLSQL,SQL튜닝,힌트
(7/13)C#,ASP.NET마스터

주말저녁(18:30~22:20) 개강
(6/28)JAVA,Network&WEB&Framework
(6/28)SQL기초에서실무까지

댓글 없음:

댓글 쓰기