CREATE TABLE ANEXONFE 
(
CDFILIAL VARCHAR2(30) NOT NULL , 
NRLANCTONF VARCHAR2(10) NOT NULL ,
DSLINKANEXO VARCHAR2(255) NOT NULL,
NRORG NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
IDATIVO VARCHAR2(1) DEFAULT 'S' NOT NULL,
CONSTRAINT CKC_IDATIVO_ANEXONFE CHECK (IDATIVO IN ('S','N')),  
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' 
)
/
ALTER TABLE MODDOCFISCTPOP ADD IDOBRIGANEXO VARCHAR2(1) DEFAULT 'N' NOT NULL
/
ALTER TABLE MODDOCFISCTPOP ADD CONSTRAINT CKC_IDOBRIGANEXO_MODDOC CHECK (IDOBRIGANEXO IN ('S', 'N'))
/
ALTER TABLE MODDOCFISCTPOP ADD IDBLOQANEXO VARCHAR2(1)
/
ALTER TABLE MODDOCFISCTPOP ADD CONSTRAINT CKC_IDBLOQANEXO_MODDOC CHECK (IDBLOQANEXO IN ('0', '1', '2') OR IDBLOQANEXO IS NULL)
/
ALTER TABLE TIPOOPERAC ADD IDOBRIGANEXO VARCHAR2(1) DEFAULT 'N' NOT NULL
/
ALTER TABLE TIPOOPERAC ADD CONSTRAINT CKC_IDOBRIGANEXO_TIPOPER CHECK (IDOBRIGANEXO IN ('S', 'N'))
/
ALTER TABLE TIPOOPERAC ADD IDBLOQANEXO VARCHAR2(1)
/
ALTER TABLE TIPOOPERAC ADD CONSTRAINT CKC_IDBLOQANEXO_TIPOPER CHECK (IDBLOQANEXO IN ('0', '1', '2') OR IDBLOQANEXO IS NULL)