Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Recursive SQL to drop and add Foreign Key constraints
I did write few like this, but I do not have them handy now. You can write
one yourself by creating new function which returns a string with the name
of the columns from ALL_CONS_COLUMNS, and then write the SQL like:
SELECT 'ALTER TABLE '||TABLE_NAME||' .......... ,
<function>
FROM ALL_CONS_COLUMNS;
Let me know if you have problems with that.
Good luck
Andy Smith <andy.smith_at_citicorp.com> wrote in article
<3332710A.2855_at_citicorp.com>...
> --
> I'm going to rebuild some Primary Key (indexes) constraints and
> need some scripts that will go through the database and produce
> ALTER TABLE statements for dropping and re-creating the Foreign Key
> constraints.
>
> Does anyone have any scripts to this sort of thing ?
>
>
> Regards
> =================================================================
> Andy Smith Email: andy.smith_at_citicorp.com
>
Received on Mon Mar 24 1997 - 00:00:00 CST