• David Conn (5/23/2013)


    It's a shame that "Between -1 And -10" and "Between -10 and -1" aren't equivalent in T-SQL.

    I haven't read BOL re. "Between" but does it state that it has to be Lower to Higher ?

    http://msdn.microsoft.com/en-us/library/ms187922.aspx

    If it was an Exam Question then I would've accepted both Answers.

    If the exam question was on English, I would agree. For an SQL exam, I would not. Examiners are supposed to test whether the candidate understands the subject matter as it is, not as the examiner would like it to be.

    For an exam with open (not multiple choice) questions, if BETWEEN was used in an answer with begin and end parameters reversed but otherwise correct, I would only apply a small deduction.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/