I just realized that SQL server '='
comparator when used for text comparison is case insensitive. I have a few questions regarding this functionality:
- Is this the same for all databases or specific to SQL server?
- I have been using the
lower
function to ensure the text comparison is insensitive till now. Is it still a good idea to follow the same? - How can we do case sensitive comparisons in SQL server?
- Why is
'='
operator defaulting to case insensitive comparison?