UPDATE & LIMIT together?

From: tp <tp(at)emaze(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: UPDATE & LIMIT together?
Date: 2002-08-28 16:09:29
Message-ID: 20020828160929.GL20155@emaze.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi

I want to SELECT at max. 10 rows and SET a variable for the
select 10 rows with the same query.

Under mysql i can use:
UPDATE table SET uniq_iq=12345 LIMIT 10
SELECT * FROM table WHERE uniq_id=1234;

This is not supported by postgres.

Is there some easy solution that does not require locking?

-tp

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message friedrich nietzsche 2002-08-28 16:32:45 Re: Retrieving the new nextval...
Previous Message Kevin Brannen 2002-08-28 16:09:27 Re: [SQL] Retrieving the new "nextval" for primary keys....