Re: no keys... - Mailing list pgsql-general

From Jeff Davis
Subject Re: no keys...
Date
Msg-id 200207161340.39845.list-pgsql-general@empires.org
Whole thread Raw
In response to no keys...  ("Dorward Villaruz" <dorwardv@ntsp.nec.co.jp>)
Responses Re: no keys...  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-general
Each row automatically has an oid assigned to it, which can act as a key. It's
sort of "hidden", but all you have to do is "select oid,* from mytable" to
see it. Then you can delete based on that oid.

Regards,
    Jeff

On Tuesday 16 April 2002 12:31 pm, Dorward Villaruz wrote:
> i have a table where there is no primary key
>
> i have 5 rows of data
>
> day1 time1
> day1 time1
> day1 time2
> day1 time2
> day1 time2
>
> time2 is newer than time1, how should i delete the four oldest record in
> the table. this means that the only row that will be left on my table is:
>
>  day1 time2


pgsql-general by date:

Previous
From: snpe
Date:
Subject: Drop constraint
Next
From: Andrew Sullivan
Date:
Subject: Re: table size growing out of control