CREATE TABLE CONTRATOCLIENTE (
  NRCONTRATOCLIENTE NUMBER(10) NOT NULL, 
  NRPARACONTRPROPOSTA NUMBER(10) NOT NULL, 
  CDFILIAL VARCHAR2(4) NOT NULL, 
  NRORCAEVENTO VARCHAR2(10) NOT NULL, 
  NRSEQORCAEVE VARCHAR2(2) NOT NULL, 
  NRENDCLIORCEVE VARCHAR2(10) NOT NULL, 
  NMCONTRATOCLIENTE VARCHAR2(250) NOT NULL, 
  IDCONTREMITIDO VARCHAR2(1) DEFAULT 'N' NOT NULL, 
  DSLOCALARQUIVO VARCHAR2(250) NOT NULL, 
  DSLOCALARQEMITIDO VARCHAR2(250) DEFAULT NULL NULL, 
  DTEMISSAOCONTRAT DATE DEFAULT NULL NULL, 
  NRORG NUMBER(10) DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL, 
  IDATIVO VARCHAR2(1) DEFAULT 'S' NOT NULL, 
  DTINCLUSAO DATE DEFAULT NULL NULL, 
  DTULTATU DATE DEFAULT NULL NULL, 
  NRORGINCLUSAO NUMBER(10) DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NULL, 
  CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL, 
  NRORGULTATU NUMBER(10) DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NULL, 
  CDOPERULTATU VARCHAR2(12) DEFAULT 'S' NULL,
  CONSTRAINT PK_CONTRATOCLIENTE PRIMARY KEY(NRCONTRATOCLIENTE)
)
/
ALTER TABLE CONTRATOCLIENTE ADD CONSTRAINT CKC_IDCONTREMITIDO CHECK (IDCONTREMITIDO IN ('S','N'))
/
ALTER TABLE CONTRATOCLIENTE ADD CONSTRAINT CKC_IDATIVO_CONTRATOCLIENTE CHECK (IDATIVO IN ('S','N'))