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: simple PL/SQL Question: deleting repeated rows

Re: simple PL/SQL Question: deleting repeated rows

From: Dymynix <no_at_anon>
Date: Wed, 27 Mar 2002 17:19:30 -0000
Message-ID: <1017249515.11858.0.nnrp-14.c2d92da9@news.demon.co.uk>


Try something like

delete from tab1
  where (row1, rowid) not in (select row1, min(rowid)

                                                from tab1
                                                group by row1);

"Mario Christ" <mario.christ_at_gmx.net> wrote in message news:ca4deda8.0203270901.7938e88e_at_posting.google.com...
> Hi,
>
> I am just starting with PL/SQL. Maybe someone can help solving a very
> simple problem.
>
> suppose you have the following table (one row only):
>
> ROW1
> A
> B
> B
> C
> B
>
> how do I delete the repetitions? The table I want to get would be:
> ROW1
> A
> B
> C
> B
>
>
> thank you in advance,
> Mario Christ, Berlin
Received on Wed Mar 27 2002 - 11:19:30 CST

Original text of this message

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