Subject | Find all records on all tables that violate constraints? |
---|---|
Author | Kjell Rilbe |
Post date | 2014-02-27T23:29:34Z |
Hi,
It seems I've been a bit sloppy when introducing new constraints in my
database. At least I found one table with a record that has null in a
column that I've altered to not null.
So, is there any nice convenient way to find all such records in all
tables? I'm thinking an execute statement that iterates system tables to
find all not null columns and select where XXX is null on each such
table and column...? I think that would suffice in this case,
considering the set of constraints I have.
Regards,
Kjell
It seems I've been a bit sloppy when introducing new constraints in my
database. At least I found one table with a record that has null in a
column that I've altered to not null.
So, is there any nice convenient way to find all such records in all
tables? I'm thinking an execute statement that iterates system tables to
find all not null columns and select where XXX is null on each such
table and column...? I think that would suffice in this case,
considering the set of constraints I have.
Regards,
Kjell