CREATE TABLE GERPARAMGERAL(
   CDPARGERAL     	 VARCHAR2(4)  DEFAULT '0001' NOT NULL, 
   CDTPOPREMSAID  	 VARCHAR2(02),
   CDTPOPREMENTR  	 VARCHAR2(02),
   CDTPOPRETSAID  	 VARCHAR2(02),
   CDTPOPRETENTR  	 VARCHAR2(02),
   IDNFREMRETAUTO 	 VARCHAR2(01) DEFAULT 'N',
   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_GERPARAMGERAL CHECK (IDATIVO IN ('S','N')),
		CONSTRAINT CKC_IDNFREMRETAUTO CHECK (IDNFREMRETAUTO IN ('S','N')),
		CONSTRAINT PK_GERPARAMGERAL PRIMARY KEY (CDPARGERAL)
)
/

INSERT INTO GERPARAMGERAL (CDPARGERAL) VALUES  ('0001')
/

COMMIT
/ 