**SQL 기본운영사항***
--테이블명 조회
select A.table_name, B.comments
from all_tables A, all_tab_comments B
where A.table_name = '테이블명'
and A.table_name = B.table_name
order by A.table_name
;
select *
from all_tab_comments
where 1=1
and table_type = 'TABLE'
and comments like '%사원%'
order by owner, table_name
;
--컬럼명 테이블 찾기
select
from all_tab_columns atc, all_tab_comments atcm
where atc.column_name = '컬럼명'
and atc.owner = atcm.owner
and atc.table_name = atcm.table_name
--and atcm.table_type = 'TABLE'
order by atc.owner, atc.table_name
;
--프로시져 text 검색
select *
from user_source
where 1=1
and type = 'PROCEDURE'
and text LIKE '%찾을text%'
order by name, line
;
select *
from all_source
where 1=1
and type = 'PROCEDURE'
and text LIKE '%찾을text%'
;
'Database > oracle' 카테고리의 다른 글
[oracle] 오라클 table Function , Pipelined Table Function (0) | 2023.04.17 |
---|---|
[oracle] 오라클 varray, nestedtable, 연관배열 (0) | 2023.04.17 |
[oracle] 오라클 스케줄 작업 (0) | 2023.04.17 |
[oracle] PL_SQL 기본틀, 반복 FOR ..IN LOOP 기본 (0) | 2023.04.17 |
[oracle] 적금 월복리 (0) | 2023.04.17 |