Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simple Query Help....
Comments embedded.
amerar_at_iwc.net wrote:
> Hey All,
>
> I just need a bit of help with this query. I want to select all of the
> duplicate synonym names in the database.
A simple group by query with a having clause works here:
select synonym_name
from dba_synonyms
group by synonym_name
having count(*) > 1;
>However, I want to list not
> just the synonym name, but also the owner of the synonym
> name............
>
So? You can't think far enough ahead to use the above query as a list generator for an IN clause? Obviously not, given this is no different from your usual posts
select owner, synonym_name
from dba_synonyms
where synonym_name in ( select synonym_name
from dba_synonyms group by synonym_name having count(*) > 1)order by synonym_name, owner;
Reading the problem is half of the battle. Are the schools teaching less while charging more, or is the clientelle to which they cater increasingly lazy?
David Fitzjarrell Received on Tue Oct 10 2006 - 15:28:18 CDT