Database Administration (MOSC)

MOSC Banner

Trigger Foreigh Key change when changing size of Primary key

edited Sep 3, 2010 3:47AM in Database Administration (MOSC) 3 commentsAnswered ✓
Hello,
Please help me with this situation.
Let's say I have a table with a PK and several other tables having FK pointing to PK.
PK is of type number(3) and FK are of type number(3).
The issue appears when I have to modify my PK e.g. from number(3) column type to number(5), but this does not trigger a modification of FK from number(3) to number(5) leading to insert problems.
The modification is done manually, but this is hard in a large database.
Is there any way to trigger this automatically or a script to do alter FK for all keys referencing my PK?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center