I have never seen order by in a delete statement in Oracle so I tested it.

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 07:45:50 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> create table a (a1 number, a2 number);

Table created.

SQL> delete from a where a1 = 10 order by a2;
delete from a where a1 = 10 order by a2
                            *
ERROR at line 1:
ORA-00933: SQL command not properly ended

Sure enough, it doesn't work.  What are you trying to do with an order by on
a delete?  


Jon

-----Original Message-----
From: Evandro Andersen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 25, 2007 7:25 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Delete/Update with ORDER BY

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





      Abra sua conta no Yahoo! Mail, o único sem limite de espaço para
armazenamento!
http://br.mail.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to