CREATE TABLE ITPADRAOGERPREVPAX (
  CDFILIAL VARCHAR2(4) NOT NULL, 
  NRITPADRAOGERPREVPAX NUMBER(10) NOT NULL, 
  NRPADRAOGERPREVPAX NUMBER(10) NOT NULL, 
  CDCIA VARCHAR2(4) NOT NULL, 
  NRVOO VARCHAR2(5) NOT NULL, 
  CDTRECHO VARCHAR2(4) NOT NULL, 
  CDEQUIP VARCHAR2(4) NOT NULL, 
  CDCLASSE VARCHAR2(4) NOT NULL, 
  QTITEM DOUBLE PRECISION NOT NULL, 
  NRORG NUMBER(10) DEFAULT 1 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, 
  CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL, 
  NRORGULTATU NUMBER(10) DEFAULT 1 NULL, 
  CDOPERULTATU VARCHAR2(12) DEFAULT '1' NULL,
  CONSTRAINT PK_ITPADRAOGERPREVPAX PRIMARY KEY(CDFILIAL, NRITPADRAOGERPREVPAX, NRORG)
)
/
ALTER TABLE ITPADRAOGERPREVPAX ADD CONSTRAINT CKC_IDATIVO_ITPADRAOGERPREVPAX CHECK (IDATIVO IN ('S','N'))
