Dictionary
Dictionary의 예
desc dictionary; --테이블 구조
desc s_emp;
select *
from dictionary;
select count(*) --개수
from dictionary;
select *
from dictionary
where table_name like 'USER%'; --대문자로 써야 함
select object_name --사용자가 소유한 모든 테이블 조회
from user_objects
where object_type='SEQUENCE';
select table_name --사용자가 소유한 특정 테이블 조회
from user_tables
where table_name='COUNTRY';
select constraint_name, constraint_type,search_condition,r_constraint_name
from user_constraints --STUDENT의 테이블레벨 제한 검색
where table_name='STUDENT';
--제약조건 정보가 나옴
select constraint_name,column_name
from user_cons_columns -- STUDENT의 컬럼레벌 제한 검색
where table_name='STUDENT';
--컬럼 정보 확인
select column_name, data_type,nullable
from user_tab_columns
where table_name='COUNTRY';
--인덱스 확인
select index_name, table_name
from user_indexes
where table_name='S_EMP';
--인덱스 컬럼 확인
SELECT index_name, column_name
FROM user_ind_columns
WHERE table_name = 'S_EMP';