Skip to main content

Creating Synonyms of Tables For Another Schema

Following command can be used for generating “create synonym” queries. schema2 is the newly added schema that needs to use synomym. schema1 is the old schema that holds tables.

select 'create synonym <schema2>.' || TABLE_NAME || ' for <schema1>.' || TABLE_NAME || ';' from dba_tables where owner='<schema1>'


Popular posts from this blog