rem indX.sql - Indexed columns of 1 or more tables of 1 user
rem desc : Shows Indexed columns, uniqueness, distinct_keys.
rem usage: Enter a table_name or first 10 characters of a table_name.
rem Return gives ALL indexes of the user running the statement.
col table_name format A16 trunc
col index_name format A18 trunc
col column_name format A20 trunc
col column_position format 99 head 'Col|pos'
col uniqueness format A9 head 'Unique?'
col distinct_keys format 9999999 head 'Distinct|keys'
break on table_name skip 1
select I.table_name,I.index_name
,I.uniqueness,I.distinct_keys
,C.column_name,C.column_position
from USER_IND_COLUMNS C
,USER_INDEXES I
where C.index_name = I.index_name
and I.table_name like upper('&table_name%')
order by table_name,index_name,column_position
;
OUTPUT:
Distinct Col
TABLE_NAME INDEX_NAME Unique? keys COLUMN_NAME pos
---------------- ------------------ --------- -------- -------------------- ---
DEPT PK_DEPT UNIQUE DEPTNO 1
EMP PK_EMP UNIQUE EMPNO 1
rem desc : Shows Indexed columns, uniqueness, distinct_keys.
rem usage: Enter a table_name or first 10 characters of a table_name.
rem Return gives ALL indexes of the user running the statement.
col table_name format A16 trunc
col index_name format A18 trunc
col column_name format A20 trunc
col column_position format 99 head 'Col|pos'
col uniqueness format A9 head 'Unique?'
col distinct_keys format 9999999 head 'Distinct|keys'
break on table_name skip 1
select I.table_name,I.index_name
,I.uniqueness,I.distinct_keys
,C.column_name,C.column_position
from USER_IND_COLUMNS C
,USER_INDEXES I
where C.index_name = I.index_name
and I.table_name like upper('&table_name%')
order by table_name,index_name,column_position
;
OUTPUT:
Distinct Col
TABLE_NAME INDEX_NAME Unique? keys COLUMN_NAME pos
---------------- ------------------ --------- -------- -------------------- ---
DEPT PK_DEPT UNIQUE DEPTNO 1
EMP PK_EMP UNIQUE EMPNO 1
[100%환급,실무전문]SQL/빅데이터/자바/스프링/웹퍼블리싱/안드… | 12-27 | 2850 | ||
[채용확정무료교육]오라클자바개발잘하는신입뽑기2개월과정,교육… | 12-11 | 2079 | ||
53 | [평일100%환급7건]웹퍼블리싱,자바&JSP,안드로이드,C#닷넷,SQL기… | 03-15 | 1917 | |
52 | [주말]C#,ASP.NET마스터 | 01-31 | 2069 | |
51 | [기업100%환급,평일주간]SQL기초에서스키마오브젝트,PLSQL,힌트… | 01-31 | 3032 | |
50 | [주말주간]자바&웹,jQUERY,스프링프레임워크,마이바티스 | 01-31 | 1595 | |
49 | [평일주간/야간,주말주간/야간]Spring,MyBatis,Hibernate개발자… | 01-19 | 1923 | |
48 | [평일주간/야간,주말주간/야간]안드로이드개발자과정(Adnroid 교… | 01-11 | 1783 | |
47 | [평일야간,주말주간야간]JAVA,Network&JSP&Spring,MyBatis,Hiber… | 01-03 | 2383 | |
46 | [100%환급,실무전문]SQL/빅데이터/자바/스프링/웹퍼블리싱/안드… | 12-27 | 2850 | |
45 | [주말야간]개발자를위한PLSQL,SQL튜닝,힌트(토/일) | 12-19 | 2003 | |
44 | [평일주간/야간,주말주간/야간]웹퍼블리싱 마스터(HTML5,CSS3,jQ… | 12-14 | 1975 | |
43 | [채용확정무료교육]오라클자바개발잘하는신입뽑기2개월과정,교육… | 12-11 | 2079 | |
42 | [주말야간]JAVA,JSP,Spring,PLSQL,힌트,웹퍼블리싱,안드로이드,… | 12-09 | 1616 | |
41 | [평일야간,주말야간]닷넷(C#,Network,ADO.NET,ASP.NET)마스터 | 12-01 | 1836 | |
40 | [기업100%환급]오라클&자바웹스프링신입과정3주(SQL,JAVA,JSP,Se… | 12-01 | 2076 | |
39 | [평일야간,주말]SQL기초에서실무까지(SQL기초,PLSQL,힌트,튜닝) | 12-01 | 1492 |
댓글 없음:
댓글 쓰기