Re: Create synonym
From: G. Cristian Palma A. <gpalma_at_pehuen.dcc.uchile.cl>
Date: 1996/05/06
Message-ID: <4mlhkg$jm7_at_dcc.uchile.cl>#1/1
3 from user_tables;
:
:
:
SQL> spool off;
SQL> start syns;
Date: 1996/05/06
Message-ID: <4mlhkg$jm7_at_dcc.uchile.cl>#1/1
Hong Zhou (hzhou_at_icarus.cc.uic.edu) wrote:
: I have 50 or so tables, now I want to create synonym for them,
: same name as table name. How can I do this without manully one by one?
: Thanks in advance.
Try with:
SQL> set pagesize 0; SQL> set feedback off; SQL> set lin 80; SQL> spool syns.sql; SQL> select 'create public synonym ' || table_name || ' for <user>.' 2 || table_name || ';'
3 from user_tables;
:
:
:
SQL> spool off;
SQL> start syns;
Saludos
Cristian Received on Mon May 06 1996 - 00:00:00 CEST