SELECT
'CREATE SYNONYM ' || OWNER || '.' || SYNONYM_NAME || ' FOR ' ||
TABLE_OWNER || '.' || TABLE_NAME || DECODE( DB_LINK, NULL, NULL, '@' ) || DB_LINK || ';' SINONIMO
FROM
DBA_SYNONYMS
WHERE OWNER=&P1. AND SYNONYM_NAME = '&SINONIMOS.'
/