Obsidian/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/산출물작업/DB설계서.md

1003 B

  • Table 목록
select distinct TableID , TableNm , concat('PK_', TableID) as pk_idx
   , case when ett_gbn = 'EAI_MDD' then concat('외부연계 :', ETT_DESC ) else ETT_DESC end as ett_desc 
from table_items
order by ett_seq, cast(ett_no as integer) , cast(no as integer)

  • 테이블 명세
select TableID 
   , TableNm
   , case when ett_gbn = 'EAI_MDD' then concat('외부연계 : ', ETT_DESC ) else ETT_DESC end as ett_desc 
   , `NO` 
   , CollumnID 
   , CollumnNm 
   , `Type` 
   , Len 
   , NullYn 
   , Pkyn 
   , Fkyn 
   , Idx 
   , Def 
   , Jeay 
   , bigo 
from table_items
order by ett_seq, cast(ett_no as integer) , cast(no as integer)
--

select no, TableID , TableNm, CollumnID , CollumnNm , Dong , `Type` , len, NullYn , Pkyn , Fkyn , Idx, Def, '' as jj, bigo, case when colcd = 'X' then null else colcd end as colcd , colnm_mdd, Jeay 
from table_items
order by ett_seq, cast(ett_no as integer) , cast(no as integer)

--
--