RE: sort order on VIEWs ?

  • From: "Lange, Kevin G" <kevin.lange@xxxxxxxxxx>
  • To: "Michael Moore" <michaeljmoore@xxxxxxxxx>
  • Date: Wed, 20 Apr 2011 13:39:19 -0500

Yea, I was gonna ask you the question ........ why would you include an
order by in a view ?

________________________________

From: Michael Moore [mailto:michaeljmoore@xxxxxxxxx] 
Sent: Wednesday, April 20, 2011 1:38 PM
To: Lange, Kevin G
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: sort order on VIEWs ?


Thanks kevin. 
Since asking the question I did some digging.

http://en.wikipedia.org/wiki/View_(database)
4th paragraph

The take-away is that you can do it in Oracle, but it's not standard and
probably not a good idea.

Regards,
Mike


On Wed, Apr 20, 2011 at 11:34 AM, Lange, Kevin G
<kevin.lange@xxxxxxxxxx> wrote:


        Not sure about a Guarantee, but, in my tests, as long as I did
not include an order by on the query contrary to the order by on the
view, I got my data in the order of the views order by.
         
        Of course, it was a small sampling of data.

________________________________

        From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Michael Moore
        Sent: Wednesday, April 20, 2011 1:20 PM
        To: oracle-l@xxxxxxxxxxxxx
        Subject: sort order on VIEWs ?
        
        
        If a VIEW has an ORDER BY clause, am I guaranteed to get that
sort order when I use the VIEW (provided of course that I don't specify
a different sort order)? 

        Regards,
        Mike
        
        This e-mail, including attachments, may include confidential
and/or
        proprietary information, and may be used only by the person or
entity
        to which it is addressed. If the reader of this e-mail is not
the intended
        recipient or his or her authorized agent, the reader is hereby
notified
        that any dissemination, distribution or copying of this e-mail
is
        prohibited. If you have received this e-mail in error, please
notify the
        sender by replying to this message and delete this e-mail
immediately.



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.

Other related posts: