CREATE TABLE ANEXOLANCAF 
   (	 
    NRANEXOLANCAF 		NUMBER 				NOT NULL, 
	  NRAUTOFORN 		VARCHAR2(10), 
	  CDTELA 			VARCHAR2(20) 		NOT NULL, 
	  CDFILDEST 		VARCHAR2(4), 
	  DTANEXOLANCAF 	DATE 				NOT NULL, 
	  NMANEXOLANCAF 	VARCHAR2(200) 		NOT NULL, 
	  NMPATHANEXO 		VARCHAR2(200) 		NOT NULL, 
	  DSANEXOLANCAF 	VARCHAR2(1000) 		NOT NULL, 
	  DSINFOANEXO 		VARCHAR2(4000),
	NRORG 				NUMBER 				DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL, 
	DTINCLUSAO        	DATE                NULL,
    DTULTATU          	DATE                NULL,
	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',
	IDATIVO 			VARCHAR2(1) 		DEFAULT 'S' 		NOT NULL , 
		CONSTRAINT CKC_IDATIVO_ANEXOLANCAF CHECK (IDATIVO IN ('S','N')), 
		CONSTRAINT PK_ANEXOLANCAF PRIMARY KEY (NRANEXOLANCAF)
)
/

CREATE SEQUENCE SEQ_NRANEXOLANCAF
/
ALTER TABLE PARASUPRI ADD IDANEXOLANCAF VARCHAR2(1) DEFAULT 'N' NULL
   CONSTRAINT PARASUPRI_IDANEXOLANCAF CHECK (IDANEXOLANCAF IS NULL OR (IDANEXOLANCAF IN ('S','N')))
/ 