h-you / trunk / ddl / 管理マスタ運用フラグ追加.sql
履歴 | 表示 | アノテート | ダウンロード (2.62 KB)
1 |
-- ????}?X?^
|
---|---|
2 |
drop table if exists systemmaster_OLD cascade; |
3 |
CREATE TABLE systemmaster_OLD As Select * from systemmaster; |
4 |
|
5 |
drop table if exists systemmaster cascade; |
6 |
|
7 |
create table systemmaster ( |
8 |
SystemCode decimal(3,0) unsigned not null comment '???R?[?h' |
9 |
, CompanyName1 varchar(60) not null comment '?????P' |
10 |
, CompanyName2 varchar(60) comment '?????Q' |
11 |
, CEOName varchar(60) not null comment '??\?????' |
12 |
, CEOPositionName varchar(60) comment '??\???E??' |
13 |
, ZipCode varchar(8) not null comment '?X????' |
14 |
, Address1 varchar(60) not null comment '?Z???P' |
15 |
, Address2 varchar(60) comment '?Z??2' |
16 |
, Address3 varchar(60) comment '?Z??3' |
17 |
, PhoneNumber varchar(13) not null comment '?d?b???' |
18 |
, FaxNumber varchar(13) comment 'FAX???' |
19 |
, HomePageURL varchar(120) comment '?z?[???y?[?WURL' |
20 |
, ConsumptionTax decimal(4,2) not null comment '?????' |
21 |
, CooperationRate decimal(4,2) not null comment '???????' |
22 |
, StatutoryWelfareRate decimal(4,2) not null comment '?@???????' |
23 |
, FuelPrice decimal(5,2) not null comment '?R???L???P??' |
24 |
, AreaDistance decimal(5,2) not null comment '????u????????' |
25 |
, ExcelSavePath varchar(120) comment 'Excel????p?X' |
26 |
, BusinessPeriod smallint(6) not null comment '????c?????' |
27 |
, ConstrYear smallint(6) not null comment '????H???N?x' |
28 |
, BusinessBeginDate datetime not null comment '?c????????' |
29 |
, ConstrBeginDate datetime not null comment '?H???N?x?????' |
30 |
, BusinessCompDate datetime not null comment '?c?????????' |
31 |
, ConstrCompDate datetime not null comment '?H???N?x??????' |
32 |
, ConstructionNoBase decimal(1,0) not null comment '?H????????l' |
33 |
, SloganString1 varchar(100) comment '?W??1' |
34 |
, SloganString2 varchar(100) comment '?W??2' |
35 |
, SloganString3 varchar(100) comment '?W??3' |
36 |
, OperationFlg decimal(2,0) unsigned not null comment '???F?^?p?t???O' |
37 |
, EntryDate datetime not null comment '?o?^???t' |
38 |
, UpdateDate datetime not null comment '?X?V???t' |
39 |
, constraint systemmaster_PKC primary key (SystemCode) |
40 |
) comment '????}?X?^' ; |
41 |
|
42 |
Insert INTO systemmaster |
43 |
SELECT
|
44 |
SystemCode |
45 |
, CompanyName1 |
46 |
, CompanyName2 |
47 |
, CEOName |
48 |
, CEOPositionName |
49 |
, ZipCode |
50 |
, Address1 |
51 |
, Address2 |
52 |
, Address3 |
53 |
, PhoneNumber |
54 |
, FaxNumber |
55 |
, HomePageURL |
56 |
, ConsumptionTax |
57 |
, CooperationRate |
58 |
, StatutoryWelfareRate |
59 |
, FuelPrice |
60 |
, AreaDistance |
61 |
, ExcelSavePath |
62 |
, BusinessPeriod |
63 |
, ConstrYear |
64 |
, BusinessBeginDate |
65 |
, ConstrBeginDate |
66 |
, BusinessCompDate |
67 |
, ConstrCompDate |
68 |
, ConstructionNoBase |
69 |
, SloganString1 |
70 |
, SloganString2 |
71 |
, SloganString3 |
72 |
, 0
|
73 |
, EntryDate |
74 |
, UpdateDate |
75 |
FROM systemmaster_OLD
|
76 |
; |
77 |
commit;
|