-- Create table
create table adam.FCO_INTEGRADA_RT11
(
  COMPANIA     CHAR(4) not null,
  ANIO         NUMBER not null,
  MES          NUMBER not null,
  SUCURSAL     VARCHAR2(10) not null,
  TIPO_PLANILLA CHAR(1) not null,
  PENSIONES    NUMBER(10) not null,
  SALUD        NUMBER(10) not null,
  RIESGOS      NUMBER(10) not null,
  CAJAS        NUMBER(10) not null,
  SENA         NUMBER(10) not null,
  ICBF         NUMBER(10) not null,
  ESAP         NUMBER(10) not null,
  MINEDUCACION NUMBER(10) not null,
  GRAN_TOTAL   NUMBER,
  CONTEO_AFP   NUMBER(10) not null,
  CONTEO_EPS   NUMBER(10) not null,
  CONTEO_ARP   NUMBER(10) not null,
  CONTEO_CCF   NUMBER(10) not null
)
tablespace TS_ADAMDATOS
;
-- Create/Recreate primary, unique and foreign key constraints 
alter table adam.FCO_INTEGRADA_RT11
  add constraint PK_FCO_INTEGRADA_RT11 primary key (COMPANIA,ANIO,MES,SUCURSAL,TIPO_PLANILLA)
  using index 
  tablespace TS_ADAMINDICES
;
-- Grant/Revoke object privileges 
GRANT ALL ON FCO_INTEGRADA_RT11 TO ADAMA;
