CONNECT system/manager

@c:\Oracle\Ora817\rdbms\admin\utlexcpt

ALTER TABLE system.products
ENABLE CONSTRAINT prod_uk
EXCEPTIONS INTO exceptions
/

SELECT rowid, prod_code, description
 FROM system.products
 WHERE rowid IN (SELECT row_id
		 FROM exceptions
		 WHERE table_name='PRODUCTS')
/

UPDATE system.products
 SET prod_code='100861'
 WHERE rowid= (SELECT max(row_id)
               FROM exceptions
	       WHERE table_name='PRODUCTS')
/

TRUNCATE TABLE system.exceptions
/

ALTER TABLE system.products
ENABLE CONSTRAINT prod_uk
EXCEPTIONS INTO system.exceptions
/
