Predicate ordering is not guaranteed

A typical programmer may expect that the predicates are always evaluated in the order that they are specified, but this is not true in database systems. For example, for the following clause,  where col11 = 5 and convert(int, col2) = 100 programmers may think col11 = 5 is always evaluated first, but this is not…

2

Sorting undefined characters in Unicode and/or Windows collation

When comparing two Unicode strings in non-binary collations, SQL Server uses a library that is essentially same as the Windows API CompareStringW. It defines a weight for each recognized character, and then use the weights to compare characters. However, not all code points are defined in the sorting library. They may be undefined because:  …

1