Re: no keys...

From: Jeff Davis <list-pgsql-general(at)empires(dot)org>
To: "Dorward Villaruz" <dorwardv(at)ntsp(dot)nec(dot)co(dot)jp>, "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: no keys...
Date: 2002-07-16 20:40:39
Message-ID: 200207161340.39845.list-pgsql-general@empires.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • no keys... at 2002-04-16 19:31:15 from Dorward Villaruz

Responses

Browse pgsql-general by date

  From Date Subject
Next Message snpe 2002-07-16 20:43:56 Drop constraint
Previous Message Dave Smith 2002-07-16 20:35:18 Using index with order desc