On Mar 29, 5:00 am, Niraj Parihar <[email protected]>
wrote:
> But here the column name is given and if i have 100 columns then in that
> case it is not fieaseble to use this kind on query as i need the query which
> works independent of the columns defined in the table.
> --
> Thanks and Regards,
> Niraj Singh Parihar.
>
> On Mon, Mar 29, 2010 at 1:06 PM, rajesh dhumal <[email protected]>wrote:
>
>
>
>
>
> > Try this
>
> > SELECT COL_TO_CHECK, COUNT(COL_TO_CHECK)
> > FROM TABLE_NAME
> > GROUP BY COL_TO_CHECK
> > HAVING COUNT(COL_TO_CHECK) > 1
>
> > delete from test a
> > where rowid <> ( select max(rowid)
> > from test b
> > where a.sno = b.sno
> > and a.sname = b.sname )
>
> > This querry will find duplicate rows and delete those.
>
> > On Mon, Mar 29, 2010 at 11:55 AM, Niraj Parihar <
> > [email protected]> wrote:
>
> >> Can any body help me on a query where i have to find out the number of
> >> duplicate records in a table independent of the columns defined in a table.
> >> --
> >> Thanks and Regards,
> >> Niraj Singh Parihar
>
> >>  --
> >> You received this message because you are subscribed to the Google
> >> Groups "Oracle PL/SQL" group.
> >> To post to this group, send email to [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> For more options, visit this group at
> >>http://groups.google.com/group/Oracle-PLSQL?hl=en
>
> >> To unsubscribe from this group, send email to oracle-plsql+
> >> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> >> ME" as the subject.
>
> > --
> > Rajesh V.Dhumal- Hide quoted text -
>
> - Show quoted text -

If you won't specify the columns for the table how do you propose to
find 'duplicate' columns?  I believe I understand your desire (find
completely duplicate rows in the table) however you cannot do that
without specifying column names as group by doesn't accept * as an
operand.  You don't 'need' to find such a query, you simply want to
find one to avoid typing which appears lazy to me.


David Fitzjarrell

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

To unsubscribe from this group, send email to 
oracle-plsql+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to