pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tp <tp@emaze.net>
To: pgsql-sql@postgresql.org
Subject: UPDATE & LIMIT together?
Date: Wed, 28 Aug 2002 16:09:29 +0000
Message-ID: <20020828160929.GL20155@emaze.net> (raw)

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

view thread (4+ messages)  latest in thread

Message-ID: <20020828160929.GL20155@emaze.net>
Permalink:  ../20020828160929.GL20155@emaze.net/
Also on:    postgresql.org/message-id/20020828160929.GL20155@emaze.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tp@emaze.net
  Subject: Re: UPDATE & LIMIT together?
  In-Reply-To: <20020828160929.GL20155@emaze.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox