Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group