Thread: Delete/Update with order by

Delete/Update with order by

From
"Evandro Andersen"
Date:
In Oracle you can use this:

DELETE FROM A WHERE A1 = 10 ORDER BY A2

There is something in the Postgresql ?

Evandro Andersen
Brazil
Postgresql 8.2

Re: Delete/Update with order by

From
"Scott Marlowe"
Date:
On 10/25/07, Evandro Andersen <evandro.andersen@gmail.com> wrote:
> In Oracle you can use this:
>
> DELETE FROM A WHERE A1 = 10 ORDER BY A2
>
> There is something in the Postgresql ?

That doesn't work in Oracle 9i, I tried it.

No, there's nothing exactly like it in pgsql.

Re: Delete/Update with order by

From
David Fetter
Date:
On Thu, Oct 25, 2007 at 09:22:02AM -0300, Evandro Andersen wrote:
> In Oracle you can use this:
>
> DELETE FROM A WHERE A1 = 10 ORDER BY A2
>
> There is something in the Postgresql ?

Yes.

DELETE...USING :)

http://www.postgresql.org/docs/current/static/sql-delete.html

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate