Re: OBTENER EL PENÚLTIMO REGISTRO DE UNA TABLA CON BASE EN EL EPOCH

From: Omar Beltrán Cano <omarbeltrancano(at)hotmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: OBTENER EL PENÚLTIMO REGISTRO DE UNA TABLA CON BASE EN EL EPOCH
Date: 2014-05-08 21:05:07
Message-ID: BLU436-SMTP4293D1F92061007D17EF2EBF490@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Hola Compatriota

select max(idcolumna)
from tabla
where idcolumna < (select max(idcolumna) from tabla)

Saludos desde Bogotá.

On 08/05/14 15:59, Luis Fernando Ortiz Vera wrote:
> Apreciada lista, como puedo obtener el penúltimo registro de una tabla
> en la que la llave primaria es un valor epoch (bigint), y donde dicha
> tabla no cuenta con un consecutivo.
>
> Atentamente,
>
> --
>
> *Luis Fernando Ortiz Vera.*
> *+Luis Fernando Ortiz Vera | **(at)lfernandortiz *
> |Cúcuta|Colombia|
>

-
Enviado a la lista de correo pgsql-es-ayuda (pgsql-es-ayuda(at)postgresql(dot)org)
Para cambiar tu suscripcin:
http://www.postgresql.org/mailpref/pgsql-es-ayuda

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Hellmuth Vargas 2014-05-08 21:15:23 Re: [pgsql-es-ayuda] OBTENER EL PENÚLTIMO REGISTRO DE UNA TABLA CON BASE EN EL EPOCH
Previous Message Luis Fernando Ortiz Vera 2014-05-08 20:59:25 OBTENER EL PENÚLTIMO REGISTRO DE UNA TABLA CON BASE EN EL EPOCH