CREATE TABLE CONSNSUCHACESSO
(
  NRINSJURIEST 		VARCHAR2(20)	NOT NULL,
  IDAMBIENTENFE 	VARCHAR2(1)		NOT NULL,
  NRULTNSU 			VARCHAR2(15)	NOT NULL,
  NRCONSNSU 		FLOAT,
  DTULTCONSNSU 		DATE,
  NRULTCHACESSO 	VARCHAR2(50)	NOT NULL,
  NRCONSCHACESSO 	FLOAT,
  DTULTCONSCHACESSO DATE,   
		CONSTRAINT PK_CONSNSUCHACESSO  PRIMARY KEY (IDAMBIENTENFE,NRINSJURIEST),
  NRORG             NUMBER 	        DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 		NOT NULL,
  IDATIVO           VARCHAR2(1)     DEFAULT 'S'					NOT NULL,
  DTINCLUSAO        DATE            DEFAULT SYSDATE,
  DTULTATU          DATE            DEFAULT SYSDATE,
  NRORGINCLUSAO     NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
  CDOPERINCLUSAO    VARCHAR2(12)    DEFAULT '1' 					NULL,
  NRORGULTATU       NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
  CDOPERULTATU      VARCHAR2(12)    DEFAULT '1',
		CONSTRAINT CKC_IDATIVO_CONSNSUCHACESSO CHECK (IDATIVO IN ('S','N'))
)
/
ALTER TABLE NOTADESTINADA ADD IDBAIXOUXML VARCHAR2(1)
/