On Aug 24, 2005, at 4:47 PM, Lane Van Ingen wrote:
I want to select 2nd oldest transaction from foo (transaction 3). The
solution below
works, but I think there may be a better way. Does anyone else have
a better
idea?
why not just select order by update_time desc limit 2 then discard
you can also do
select ... order by update_time desc offset 1 limit 1
On Thursday 25 August 2005 10:47 am, Vivek Khera wrote:
On Aug 24, 2005, at 4:47 PM, Lane Van Ingen wrote:
I want to select 2nd oldest transaction from foo (transaction 3). The
solution below
works, but I think there
Given the following data in a table named 'foo' :
id update_time description
22005-08-24 00:10:00 transaction1
22005-08-24 00:22:00 transaction2
22005-08-24 00:34:00 transaction3
22005-08-24 00:58:00 transaction4
I want to select 2nd
On Wed, Aug 24, 2005 at 04:47:16PM -0400, Lane Van Ingen wrote:
Given the following data in a table named 'foo' :
id update_time description
22005-08-24 00:10:00 transaction1
22005-08-24 00:22:00 transaction2
22005-08-24 00:34:00 transaction3
Lane Van Ingen [EMAIL PROTECTED] writes:
I want to select 2nd oldest transaction from foo (transaction 3).
Can't you just do
select * from foo order by update_time desc offset 1 limit 1
regards, tom lane
---(end of
On Wed, Aug 24, 2005 at 05:34:49PM -0600, Michael Fuhr wrote:
On Wed, Aug 24, 2005 at 04:47:16PM -0400, Lane Van Ingen wrote:
Given the following data in a table named 'foo' :
id update_time description
22005-08-24 00:10:00 transaction1
22005-08-24