/*
================================================================================
档案代号:stk1_file
档案名称:销售量值统计档--By 产品别(内外销)
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table stk1_file
(
stk01       number(5) NOT NULL,      /*年度                                   */
stk02       number(5) NOT NULL,      /*月份                                   */
stk03       varchar2(10) NOT NULL,   /*产品别                                 */
stk031      varchar2(1) NOT NULL,    /*内外销                                 */
                                     /*内外销:1.内销 2.外销                   */
stk04       number(15,3),            /*销售数量                               */
stk05       number(20,6),            /*销售金额                               */
stk06       number(20,6),            /*销售成本                               */
stk07       number(15,3),            /*销退数量                               */
stk08       number(20,6),            /*销退金额                               */
stk09       number(20,6)             /*销退成本                               */
);

create unique index stk1_pk on stk1_file (stk01,stk02,stk03,stk031);
alter table stk1_file add  constraint stk1_pk primary key  (stk01,stk02,stk03,stk031) enable validate;
grant select on stk1_file to public;
grant index on stk1_file to public;
grant update on stk1_file to public;
grant delete on stk1_file to public;
grant insert on stk1_file to public;