• dfine (12/22/2010)


    Yes, the answer is "Ann". But when you say most of the time we would get “Ann” since the clustered index is created on “first name”.

    Why can’t we say it is always return the “Ann”?

    I did execute the query more than 10 times, all the time the result was “Ann”.

    Just trying to understand, in which scenario SQL Server return different result than “Ann”?

    For this small result set with simple key it will probably always return 'Ann'.

    But when you are talking about very large tables with a clustered index, the output might not be predictable.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP