-- Create table
create table adam.FCO_INTEGRADA_RT09
(
  COMPANIA    CHAR(4) not null,
  ANIO        NUMBER not null,
  MES         NUMBER not null,
  SUCURSAL    VARCHAR2(10) not null,
  TIPO_PLANILLA CHAR(1) not null,
  SECUENCIA   NUMBER not null,
  NIT         VARCHAR2(16) not null,
  DV          CHAR(1) not null,
  VALOR       NUMBER(10) not null,
  DIAS_MORA   NUMBER not null,
  INT_MORA    NUMBER(10) not null,
  TOTAL_PAGAR NUMBER
)
tablespace TS_ADAMDATOS
;
-- Create/Recreate primary, unique and foreign key constraints 
alter table adam.FCO_INTEGRADA_RT09
  add constraint PK_FCO_INTEGRADA_RT09 primary key (COMPANIA,ANIO,MES,SUCURSAL,TIPO_PLANILLA)
  using index 
  tablespace TS_ADAMINDICES
;
-- Grant/Revoke object privileges 
GRANT ALL ON FCO_INTEGRADA_RT09 TO ADAMA;
