h-you / branches / ddl / 20170714_SQL.txt @ 270
履歴 | 表示 | アノテート | ダウンロード (1.34 KB)
1 | 239 | h-you | drop table if exists SFPData cascade; |
---|---|---|---|
2 | |||
3 | -- ???S?p?g???[???f?[?^ |
||
4 | create table SFPData ( |
||
5 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '?H???R?[?h' |
||
6 | , DataCount decimal(2,0) unsigned not null comment '?p?g???[????' |
||
7 | , RequestDate datetime not null comment '?p?g???[???v??????' |
||
8 | , PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h' |
||
9 | , StringValue varchar(300) COMMENT '?R?????g' |
||
10 | , OrderNo decimal(2,0) unsigned not null comment '?\????t???' |
||
11 | , EntryDate datetime NOT NULL COMMENT '?o?^???t' |
||
12 | , UpdateDate datetime NOT NULL COMMENT '?X?V???t' |
||
13 | , constraint SFPData_PKC primary key (ConstructionCode, DataCount) |
||
14 | ) comment '???S?p?g???[???f?[?^' ; |
||
15 | |||
16 | create index SFPData_Index1 |
||
17 | on SFPData(RequestDate); |
||
18 | |||
19 | drop table if exists SFPDataDetail cascade; |
||
20 | |||
21 | -- ???S?p?g???[??????f?[?^ |
||
22 | create table SFPDataDetail ( |
||
23 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '?H???R?[?h' |
||
24 | , DataCount decimal(2,0) unsigned not null comment '?p?g???[????' |
||
25 | , SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??' |
||
26 | , CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h' |
||
27 | , EntryDate datetime NOT NULL COMMENT '?o?^???t' |
||
28 | , UpdateDate datetime NOT NULL COMMENT '?X?V???t' |
||
29 | , constraint SFPDataDetail_PKC primary key (ConstructionCode, DataCount, SeqNo) |
||
30 | ) comment '???S?p?g???[??????f?[?^' ; |