Re: Quick question about PL/SQL CURSOR definition and ORDER BY

  • From: Andy Klock <andy@xxxxxxxxxxxxxxx>
  • To: manips2002@xxxxxxxxx
  • Date: Sun, 26 Feb 2012 09:42:55 -0500

Looks like you are using a subquery when (from what I can tell in your
example) one is not needed.  Why not leave the parenthesis out altogether?
 CURSOR x1 IS
   SELECT c1
   FROM T1
   ORDER BY c2;

Use them when you actually need them.

For reference:

http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/sqloperations.htm#i3317

On Sun, Feb 26, 2012 at 1:17 AM, Mani <manips2002@xxxxxxxxx> wrote:

> Hi,
>
> I had a question about using ORDER BY in a CURSOR declaration..
>
> The following cursor declaration appears to not work.. the compilation
> error is about missing right paranthesis..
>
>  CURSOR x1 IS
>   (SELECT c1
>    FROM T1
>    ORDER BY c2);
>
>


--
http://www.freelists.org/webpage/oracle-l


Other related posts: