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

47 lines
1003 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
- Table 목록
```SQL
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)
```
- 테이블 명세
```SQL
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)
```
```SQL
--
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)
```
```SQL
--
```
```SQL
--
```