Re: Query

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Erik Cubillos <nemesis0429(at)hotmail(dot)com>
Cc: mvillagomez(at)sayab(dot)com(dot)mx, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Query
Date: 2006-01-10 22:02:53
Message-ID: c2d9e70e0601101402r5c1ff2c0l7f0cb8ae2d6a269@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On 1/10/06, Erik Cubillos <nemesis0429(at)hotmail(dot)com> wrote:
> ok intenta asi
>
> select distinct(Columna2) as campo, columna1, columna2
> from tabla
> order by columna1
>
>

select distinct on (columna2) * from tabla order by columna2;

sin embargo no puedes controlar si va a salir la primera fila o la
segunda de las que tienen el valor repetido

--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

In response to

  • RE: Query at 2006-01-10 21:53:16 from Erik Cubillos

Responses

  • Re: Query at 2006-01-10 22:52:11 from Jaime Casanova

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Jaime Casanova 2006-01-10 22:52:11 Re: Query
Previous Message Erik Cubillos 2006-01-10 21:53:16 RE: Query