Actions
Mlmsalesreport table schema » History » Revision 1
Revision 1/2
| Next »
chin-yeh, 02/09/2012 05:06 PM
mlmsalesreport table schema¶
DROP TABLE T_REALMLM_SALES_LIST ; DROP TABLE T_REALMLM_SALES ; DROP TABLE T_REALMLM ; CREATE TABLE T_REALMLM ( SEQ INTEGER NULL, COMPANY_CODE VARCHAR(4) NULL, JOBCODE VARCHAR(2) NULL, STATE VARCHAR(10) NULL, ERRCODE VARCHAR(10) NULL, ERRORMSG VARCHAR(500) NULL, GUARANTE_NUM VARCHAR(17) NULL, REGIDAY DATE NULL, SEANDAY DATE NULL, RECVDAY DATE NULL ) ; ALTER TABLE T_REALMLM ADD PRIMARY KEY (SEQ) ; CREATE TABLE T_REALMLM_SALES ( SEQ INTEGER NOT NULL, SALEORDER_NUM VARCHAR(30) NULL, ORDER_TYPE VARCHAR(10) NULL, MEMBER_KIND VARCHAR(1) NULL, MEMBER_NAME VARCHAR(30) NULL, MEMBER_NUM VARCHAR(14) NULL, RESIDENT_NUM VARCHAR(13) NULL, TEL_NO VARCHAR(20) NULL, MOBILE_NO VARCHAR(20) NULL, POST_NO1 VARCHAR(6) NULL, POST_ADDR1 VARCHAR(120) NULL, POST_ADDR2 VARCHAR(120) NULL, SALES_CARD NUMERIC(12) NULL, SALES_CASH NUMERIC(12) NULL, SALES_SENDAMT NUMERIC(12) NULL, SALES_DT VARCHAR(8) NULL, OLD_ORDER_NUM VARCHAR(30) NULL, OLD_ORDER_SEQ VARCHAR(30) NULL, DELIVERY_QUANTITY NUMERIC(4) NULL, DELIVERY_SEQ VARCHAR(30) NULL, DELIVERY_DT VARCHAR(8) NULL ) ; ALTER TABLE T_REALMLM_SALES ADD PRIMARY KEY (SEQ) ; CREATE TABLE T_REALMLM_SALES_LIST ( SEQ INTEGER NOT NULL, ORDER_SEQ VARCHAR(30) NULL, GOODS_NAME VARCHAR(80) NULL, GOODS_COST NUMERIC(8) NULL, QUANTITY NUMERIC(4) NULL, OLD_ORDER_NUM VARCHAR(30) NULL, OLD_ORDER_SEQ VARCHAR(30) NULL ) ; ALTER TABLE T_REALMLM_SALES_LIST ADD PRIMARY KEY (SEQ,ORDER_SEQ) ; ALTER TABLE T_REALMLM_SALES ADD FOREIGN KEY R_35 (SEQ) REFERENCES T_REALMLM(SEQ) ; ALTER TABLE T_REALMLM_SALES_LIST ADD FOREIGN KEY R_36 (SEQ) REFERENCES T_REALMLM_SALES(SEQ) ;
Updated by chin-yeh almost 13 years ago · 1 revisions