Tip :- How do I filter out constraint violation rows ?
Here are the stepwise hints to follows the
constraint violation rows
Step 1. create the
exception table
Execute utlexcpt.sql from
ORACLE_HOME/rdbms/admin
SQL>@$ORACLE_HOME/rdbms/admin/utlexcpt.sql
It will create an exception table named exceptions
Step 2. enable
constraint
SQL> Alter table
<table_name> enable validate
constraint <constraint_name>
exceptions into exceptions.
By this step , exceptions table
will populate with violating row.
Step 3. Find the
violating rows
SQL> select * from <table_name> where rowid in (select rowid from exceptions);
End of Tip
|
Welcome
to send comments or feedback at Wadhwa_s@Hotmail.com |
|
|
Copyright © Oracle Techniques All Rights Reserved
|