ALTER TABLE FILIAL ADD (
  IDCENTRALFATU VARCHAR2(1) DEFAULT 'N' NOT NULL, 
  CDFILCENTRALFATU VARCHAR2(4) DEFAULT NULL NULL
)
/
ALTER TABLE FILIAL ADD CONSTRAINT FKGER00665FILIAL FOREIGN KEY (CDFILCENTRALFATU, NRORG) REFERENCES FILIAL (CDFILIAL, NRORG)
/
ALTER TABLE FILIAL ADD CONSTRAINT CKC_IDCENTRALFATU_FILIAL CHECK (IDCENTRALFATU IN ('S','N'))
/
CREATE INDEX FKGER00665FILIAL ON FILIAL (CDFILCENTRALFATU ASC)