select 'create or replace synonym IMES_FATP.'||table_name||'
for LZSZ_IMES_SZFP25PD.'||table_name||';
grant SELECT on IMES_FATP.'||table_name||';' FROM all_tables
WHERE owner = 'LZSZ_IMES_SZFP25PD'
AND table_name LIKE 'M%';
select 'create or replace synonym IMES_FATP.'||table_name||'
for LZSZ_IMES_SZFP25PD.'||table_name||';
grant SELECT on IMES_FATP.'||table_name||';' FROM all_tables
WHERE owner = 'LZSZ_IMES_SZFP25PD'
AND table_name LIKE 'M%';