Obsidian/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/산출물작업/테이블 필드 검증.md

25 lines
397 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
```SQL
-- 데이터사전에 없는 용어 사용 확인
select *
from table_items a
where ETT_GBN <> 'EAI_MDD'
and not exists (
select 'x'
from v_datadic b
where instr(a.CollumnID , b.item) > 0 )
-- 동일테이블 중복 항목 확인
select concat(TableID, CollumnID) as dup
from table_items
group by concat(TableID, CollumnID)
having count(concat(TableID, CollumnID) ) > 1
```