Reverse query to find Foreign Key

From: Clive <sakcee_at_gmail.com>
Date: Wed, 29 Oct 2008 00:29:17 -0700 (PDT)
Message-ID: <d8a4ed97-bf2b-4dc5-bb1f-2255c9db0443@v53g2000hsa.googlegroups.com>


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?

thanks Received on Wed Oct 29 2008 - 02:29:17 CDT

Original text of this message