Re: Reverse query to find Foreign Key
Date: Wed, 29 Oct 2008 01:42:17 -0700 (PDT)
On 29 okt, 08:29, Clive <sak..._at_gmail.com> wrote:
> I have a ID primary key that is used across many tables as fk, I want
> to find a sql (run as sysadmin) that can find all tables who have that
> id as fk and change it to something else, maintaining all constraints
> and ref integrity etc. i.e. I want to change the fk value in all
> tables to something other pk.
> is there a simple query to do this?
The underlying package contains the SQL you require plus the code to change PKs
-- Sybrand Bakker Senior Oracle DBAReceived on Wed Oct 29 2008 - 03:42:17 CDT