Re: Create synonym

From: <vermaat_at_gemini.tfdl.agro.nl>
Date: 1996/05/07
Message-ID: <1996May7.064213.477_at_ns2>#1/1


In article <Pine.SOL.3.93.960430170335.20204A-100000_at_icarus.cc.uic.edu>, Hong Zhou <hzhou_at_icarus.cc.uic.edu> writes:
>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?

Usually you do this with "dynamic SQL":

SPOOL syn.sql

SELECT 'CREATE SYNONYM '||table_name||' FOR [user].'||table_name||';' FROM USER_TABLES; SPOOL OFF _at_syn

EXIT Good luck !



| Peter J.R. Vermaat | Dutch Department of Agriculture | Wageningen |

| p.j.r.vermaat_at_tfdl.agro.nl | http://gemini.tfdl.agro.nl:1024/~vermaat/ |
|                           Flagellant in Dreamland                            |
********************************************************************************
Received on Tue May 07 1996 - 00:00:00 CEST

Original text of this message