CREATE TABLE FCM_PARAMGERAL (
    NRPARAMGERAL          	NUMBER 			NOT NULL,
    IDOBRIGACDLOCAT       	CHAR(1) 		DEFAULT 'N' NOT NULL,
    IDUTILIZAMASCCDLOCAT  	CHAR(1) 		DEFAULT 'N' NOT NULL,
    DSMASCCDLOCAT         	VARCHAR2(500),
    IDALTERAMASCCDLOCAT   	CHAR(1) 		DEFAULT 'S' NOT NULL,
    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_FCM_PARGERAL CHECK (IDATIVO IN ('S','N'))
)
/

ALTER TABLE FCM_PARAMGERAL ADD CONSTRAINT PK_FCM_PARAMGERAL PRIMARY KEY (NRPARAMGERAL)
/

ALTER TABLE FCM_PARAMGERAL ADD CONSTRAINT CKC_IDOBRIGACDLOC_FCM_PARGER CHECK (IDOBRIGACDLOCAT IN ('S', 'N'))
/

ALTER TABLE FCM_PARAMGERAL ADD CONSTRAINT CKC_IDUTMASCDLOC_FCM_PARGER CHECK (IDUTILIZAMASCCDLOCAT IN ('S', 'N'))
/

ALTER TABLE FCM_PARAMGERAL ADD CONSTRAINT CKC_IDALTMASCDLOC_FCM_PARGER CHECK (IDALTERAMASCCDLOCAT IN ('S', 'N'))
/

ALTER TABLE FCM_LOCALCLI ADD NMABREVLOCALCLI VARCHAR2(6)
/

ALTER TABLE FCM_LOCALCLI MODIFY DSCODIGOLOCALCLI VARCHAR2(500)
/