declare v_rowcount number(10); begin select count(1) into v_rowcount from user_tables where table_name = upper('sps_transfer_fare'); if v_rowcount = 0 then execute immediate ' CREATE TABLE dh_pud.sps_transfer_fare ( exchange_type varchar2(4) DEFAULT '' '' NOT NULL, fare_sub_type char(1) DEFAULT '' '' NOT NULL, transfer_fare1 number(15,2) DEFAULT 0.0 NOT NULL, transfer_fare2 number(15,2) DEFAULT 0.0 NOT NULL, remark varchar2(2000) DEFAULT '' '' NOT NULL, update_date number(10,0) DEFAULT to_number(to_char(sysdate,''yyyymmdd'')) NOT NULL, update_time number(10,0) DEFAULT to_number(to_char(sysdate,''hh24miss'')) NOT NULL ) '; execute immediate 'CREATE UNIQUE INDEX dh_pud.uk_transferfare ON dh_pud.sps_transfer_fare(exchange_type ASC,fare_sub_type ASC) '; execute immediate 'comment on table dh_pud.sps_transfer_fare is ''费用表'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.exchange_type is ''类别'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.fare_sub_type is ''子类别'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.transfer_fare1 is ''一级费用'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.transfer_fare2 is ''二级费用'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.remark is ''备注'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.update_date is ''日期'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.update_time is ''时间'''; execute immediate 'DELETE dh_pud.hsobjects WHERE object_name = ''sps_transfer_fare'''; execute immediate 'INSERT INTO dh_pud.hsobjects (object_name, object_id, own_base, object_type, object_version,service_name) values (''sps_transfer_fare'', 1, ''DH_PUD_DATA'', ''U'', ''V1.0.0'', ''sps'')'; commit; end if; end; declare v_rowcount number(10); begin select count(1) into v_rowcount from user_tables where table_name = upper('pud_seats'); if v_rowcount = 0 then execute immediate ' CREATE TABLE dh_pud.pud_seats ( exchange_type varchar2(4) DEFAULT '' '' NOT NULL, seat_no varchar2(8) DEFAULT '' '' NOT NULL, seat_name varchar2(100) DEFAULT '' '' NOT NULL, trustee_seat_no varchar2(8) DEFAULT '' '' NOT NULL, branch_no number(10,0) DEFAULT 0 NOT NULL, update_date number(10,0) DEFAULT to_number(to_char(sysdate,''yyyymmdd'')) NOT NULL, update_time number(10,0) DEFAULT to_number(to_char(sysdate,''hh24miss'')) NOT NULL, seat_prop char(1) DEFAULT '' '' NOT NULL, seatvip_flag char(1) DEFAULT '' '' NOT NULL, en_stock_type varchar2(2000) DEFAULT '' '' NOT NULL, en_client_group varchar2(2000) DEFAULT '' '' NOT NULL, default_mark char(1) DEFAULT '' '' NOT NULL, remark varchar2(2000) DEFAULT '' '' NOT NULL ) '; execute immediate 'CREATE UNIQUE INDEX dh_pud.uk_seats ON dh_pud.pud_seats(branch_no ASC,exchange_type ASC,seat_no ASC) '; execute immediate 'comment on table dh_pud.pud_seats is ''席参表'''; execute immediate 'comment on column dh_pud.pud_seats.exchange_type is ''类别'''; execute immediate 'comment on column dh_pud.pud_seats.seat_no is ''编号'''; execute immediate 'comment on column dh_pud.pud_seats.seat_name is ''单元名称'''; execute immediate 'comment on column dh_pud.pud_seats.trustee_seat_no is ''托管'''; execute immediate 'comment on column dh_pud.pud_seats.branch_no is ''分支'''; execute immediate 'comment on column dh_pud.pud_seats.update_date is ''日期'''; execute immediate 'comment on column dh_pud.pud_seats.update_time is ''时间'''; execute immediate 'comment on column dh_pud.pud_seats.seat_prop is ''属性'''; execute immediate 'comment on column dh_pud.pud_seats.seatvip_flag is ''VIP席位标志'''; execute immediate 'comment on column dh_pud.pud_seats.en_stock_type is ''允许类别'''; execute immediate 'comment on column dh_pud.pud_seats.en_client_group is ''允许分类'''; execute immediate 'comment on column dh_pud.pud_seats.default_mark is ''是否席位'''; execute immediate 'comment on column dh_pud.pud_seats.remark is ''备注'''; execute immediate 'DELETE dh_pud.hsobjects WHERE object_name = ''pud_seats'''; execute immediate 'INSERT INTO dh_pud.hsobjects (object_name, object_id, own_base, object_type, object_version,service_name) values (''pud_seats'', 1, ''DH_PUD_DATA'', ''U'', ''V1.0.0'', ''sps'')'; commit; end if; end; declare v_rowcount number(10); begin select count(1) into v_rowcount from user_tables where table_name = upper('sps_transfer_fare'); if v_rowcount = 0 then execute immediate ' CREATE TABLE dh_pud.sps_transfer_fare ( exchange_type varchar2(4) DEFAULT '' '' NOT NULL, fare_sub_type char(1) DEFAULT '' '' NOT NULL, transfer_fare1 number(15,2) DEFAULT 0.0 NOT NULL, transfer_fare2 number(15,2) DEFAULT 0.0 NOT NULL, remark varchar2(2000) DEFAULT '' '' NOT NULL, update_date number(10,0) DEFAULT to_number(to_char(sysdate,''yyyymmdd'')) NOT NULL, update_time number(10,0) DEFAULT to_number(to_char(sysdate,''hh24miss'')) NOT NULL ) '; execute immediate 'CREATE UNIQUE INDEX dh_pud.uk_transferfare ON dh_pud.sps_transfer_fare(exchange_type ASC,fare_sub_type ASC) '; execute immediate 'comment on table dh_pud.sps_transfer_fare is ''非交易过户费用表'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.exchange_type is ''交易类别'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.fare_sub_type is ''费用子类别'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.transfer_fare1 is ''非交易过户一级费用'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.transfer_fare2 is ''非交易过户二级费用'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.remark is ''备注'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.update_date is ''记录更新日期'''; execute immediate 'comment on column dh_pud.sps_transfer_fare.update_time is ''记录更新时间'''; execute immediate 'DELETE dh_pud.hsobjects WHERE object_name = ''sps_transfer_fare'''; execute immediate 'INSERT INTO dh_pud.hsobjects (object_name, object_id, own_base, object_type, object_version,service_name) values (''sps_transfer_fare'', 1, ''DH_PUD_DATA'', ''U'', ''V1.0.0'', ''sps'')'; commit; end if; end;