Synonym for Table in different schema
102024Mar 3 2008 — edited Mar 3 2008I am looking for a solution if possible where I can execute the follow line from within a package on a table in another schema, for which a synonym has been created.
EXECUTE IMMEDIATE 'alter table tablename disable constraint constraint_name;
The issue is this; I have to specify the schema name by prefix to execute this line of code thus;
EXECUTE IMMEDIATE 'alter table schema.tablename disable constraint constraint_name;
But, as in most organisations code is migrated from dev, to test, to qa, the code needs to be altered for different schema names across the different environments.
(we are using 10g)