Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Deleting synonyms

Re: Deleting synonyms

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 17 Jul 2002 00:11:06 GMT
Message-ID: <Xns924E165F5CF22gnuegischgnueg@130.133.1.4>


> How can I delete all synonyms owned by one particular user?

like this?

declare
  v_schema varchar2(30) := 'your_user_name'; begin
  for r in (select synonym_name from user_synonyms) loop     dbms_output.put_line(r.synonym_name);     execute immediate 'drop synonym ' || v_schema || '.' || r.synonym_name;   end loop;
end;
/

Make sure you change your_user_name to something useful

Hope this helped

Rene

-- 
Latest article on my HP (as of 14.07.2002):
  Transforming each character in a string with perl
  http://www.adp-gmbh.ch/perl/each_char.html
Received on Tue Jul 16 2002 - 19:11:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US