Top and Order By (Why can one change the other?)

  • Nice test Antares, was very interesting to see that the results come back as one would expect on SQL7.

    Tim C //Will code for food


    Tim C //Will code for food

  • I have to agree with Paul Thornett - you are not providing a meaningful order by clause. Yes it is interesting that SQL v7 and 2k return the results differently, but that is probably due to the way the values are popped off some internal stack.

    The main thing to learn is that you can never rely on the order of data returned to you (even if using a clustered index - although I have done no testing {and an order by clause won't hurt for a clustered index anyway just to be safe}).

    My 2 cents 🙂

    Ian

Viewing 2 posts - 16 through 16 (of 16 total)

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