ALTER TABLE CTRLDELETETAB ADD CONSTRAINT CKC_IDATIVO_CTRLDELETETAB CHECK (IDATIVO IN ('S', 'N'))
/
ALTER TABLE CTRLDELETETAB ADD CONSTRAINT PK_CTRLDELETETAB PRIMARY KEY (NMTABELA, DTDELETE)
/
UPDATE EXTRATOCONS
   SET IDIMPEXTRATO = 'S'
 WHERE NVL(IDIMPEXTRATO, 'N') <> 'S'