Re: last row of table after csv import

From: Henry Drexler <alonup8tb(at)gmail(dot)com>
To: e-letter <inpost(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: last row of table after csv import
Date: 2011-10-18 11:34:00
Message-ID: CAAtgU9SSxYFWCfgaA6Jyot0xYoekr=x+=DzAR8mULi7LAJoqhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Oct 17, 2011 at 6:06 PM, e-letter <inpost(at)gmail(dot)com> wrote:

> Readers,
>
> After csv of data, is there a command to navigate to the last row of
> data in the database table, after import of csv data? The csv file is
> not sorted, so the request is to view the last row after import. Now
> after import, the keyboard key 'z' is pressed down until the last row
> is shown in the command terminal!
>
> Thanks in advance.
>

perhaps first do a
select
count(*) from table

then

select
*
from
table
limit 1 offset (the result of your count(*) -1)

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message e-letter 2011-10-18 12:18:29 Re: last row of table after csv import
Previous Message Josh Kupershmidt 2011-10-18 02:50:36 Re: last row of table after csv import