I am attempting to create synonyms for a user in Oracle.
BEGIN
FOR S IN (SELECT owner, table_name FROM all_tables WHERE owner = 'TABLE_OWNER') LOOP
EXECUTE IMMEDIATE 'create synonym '||S.table_name||' for '||S.owner||'.'||S.table_name||'';
END LOOP;
END;
I get the following error in Toad when executed:
Error at line 1 ORA-00955: name is already used by an existing object ORA-06512: at line 3
Any thoughts?