• Hugo Kornelis (6/20/2008)


    majorbloodnock (6/20/2008)


    Of course, strictly speaking the question will only be correct for case insensitive collations, since the values in the question are "value1, value2, value3 and value4", yet the comparison value is "Value1".

    Nonetheless, a good question.

    Strictly speaking, it's correct for case sensitive collations as well, since uppercase character sort before lowercase characters. (And in binary collations, ALL uppercase characters sort before ANY lowercase character). It would have been different if the table values were uppercase and the value in the query was lowercase.

    However, even more strictly speaking, the result would have been an error if the database collation is case sensitive. After all, in a case sensitive collation, the tables TimeGroup and TimeGROUP are distinct 😀

    But I do agree with your final statement - a good question to test understanding of a very little known SQL operator. Thanks, Steve! 😉

    Oops. My mistake. Thanks, Hugo.

    Semper in excretia, suus solum profundum variat