Quick question about PL/SQL CURSOR definition and ORDER BY

  • From: Mani <manips2002@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Sun, 26 Feb 2012 01:17:01 -0500

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);

If I rewrite it by removing the paranthesis, or if I rewrite it as
below, it works..

 CURSOR x1 IS
   (SELECT c1
    FROM T1)
    ORDER BY c2;

can you let me know where I can find more information about this..??
or can you explain this a little bit more..

thanks, murali.
--
//www.freelists.org/webpage/oracle-l


Other related posts: