Programming/기본 (Baisc)
[오라클] 스키마 추출.
with INFO as ( select 'INMUN2018' as username , 'TB_CODE' as usertable from dual ), PK as ( select c.column_name , case when a.constraint_type = 'R' then 'Y' else '' end as column_fk from sys.user_cons_columns c, sys.user_constraints a, INFO u where a.owner = c.owner and a.table_name = c.table_name and a.constraint_name = c.constraint_name and a.constraint_type in ('P', 'R') and a.table_name = u..
2022. 1. 8. 16:06