Tuesday, April 18

Find schema references

Simple SQL query that can give some insight in to what references what.

You have a table, a boring old table that makes no sense to have. But someone may have create a foreign key to that table and things "may" break if you drop it with a cascade. This simple little query will show you all FK's to a table.
select u.table_name, u.constraint_name from
user_constraints u,
user_cons_columns c
where
c.constraint_name=u.r_constraint_name
and c.table_name='TABLE_NAME'
/


Oh, and yes. The iBook is chugging along just fine. Would like another 512Megs of RAM and XE on it tho.

No comments: