>
> there can be many such tables that have foreign key id which is referencing
> the master table test_master column "id". what we want is when some ids become ^^^^^^^^^^^
It should be profile_master, right?
> redundant we have to merge two ids , we want that thru out the system the
> occurance of the old primary key shud be removed and replaced with the new id.
>
Definitely it can be done in the database level. Trigger a function before
delete on the primary table (profile_master) and update the foreign tables
with appropriate id and so the redundant id can be deleted from the
primary table.
regards,
bhuvaneswaran