CREATE TABLE TIPOAJUSRECROP (
  NRTIPOAJUSRECROP NUMBER(10) NOT NULL, 
  CDFILIAL VARCHAR2(4) NOT NULL, 
  CDAJUCTREC VARCHAR2(4) NOT 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 1 NULL, 
  NRORGULTATU NUMBER(10) DEFAULT 1 NULL, 
  CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL, 
  CDOPERULTATU VARCHAR2(12) DEFAULT '1' NULL,
  CONSTRAINT PK_TIPOAJUSRECROP PRIMARY KEY(NRTIPOAJUSRECROP)
)
/
ALTER TABLE TIPOAJUSRECROP ADD CONSTRAINT CKC_IDATIVO_TIPOAJUSRECROP CHECK (IDATIVO IN ('S', 'N'))
/
ALTER TABLE TIPOAJUSRECROP ADD CONSTRAINT FKGOP00700TIPOAJRECEBER FOREIGN KEY (CDAJUCTREC) REFERENCES TIPOAJRECEBER (CDAJUCTREC)
/
CREATE INDEX FKGOP00700TIPOAJRECEBER ON TIPOAJUSRECROP (CDAJUCTREC)