You need to create a view to increase...

  • Comments posted to this topic are about the item You need to create a view to increase...

  • While this is the only way to create a view (including all the table's rows and) having an order by clause at the top level select in its definition, it doesn't necessarily follw that rows will be returned in that order when selected from the view unless the order clause is repeated at the level abobe the view.

    So the chances are that this view does nothing for usability (and hence nothing useful at all).

    Tom

  • TomThomson (2/17/2013)


    While this is the only way to create a view (including all the table's rows and) having an order by clause at the top level select in its definition, it doesn't necessarily follw that rows will be returned in that order when selected from the view unless the order clause is repeated at the level abobe the view.

    So the chances are that this view does nothing for usability (and hence nothing useful at all).

    Thanks for the clarity on that. At first I thought I just discovered how to accomplish this in a view and then learn from you that I still have to query the data with an order by clause anyway. Oh well.

  • Iwas Bornready (12/23/2015)


    TomThomson (2/17/2013)


    While this is the only way to create a view (including all the table's rows and) having an order by clause at the top level select in its definition, it doesn't necessarily follw that rows will be returned in that order when selected from the view unless the order clause is repeated at the level abobe the view.

    So the chances are that this view does nothing for usability (and hence nothing useful at all).

    Thanks for the clarity on that. At first I thought I just discovered how to accomplish this in a view and then learn from you that I still have to query the data with an order by clause anyway. Oh well.

    Actually there's a reasonable chance that the data will come back in that order. Of course they might not. Even worse, they might do so this week and not do so next week when the number of rows in the table or the amount of buffer space or something else has changed and made the optimizer do things differently.

    Tom

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply