Is the LIKE operator case-sensitive with MSSQL Server?

后端 未结 8 777
清歌不尽
清歌不尽 2020-11-27 14:15

In the documentation about the LIKE operator, nothing is told about the case-sensitivity of it. Is it? How to enable/disable it?

I am querying varchar(n)

8条回答
  •  天涯浪人
    2020-11-27 14:48

    All this talk about collation seem a bit over-complicated. Why not just use something like:

    IF UPPER(@@VERSION) NOT LIKE '%AZURE%'
    

    Then your check is case insensitive whatever the collation

提交回复
热议问题