“SELECT DISTINCT” ignores different cases

后端 未结 4 1930
故里飘歌
故里飘歌 2020-12-03 06:17

I have the problem, that MSSQL Server 2000 should select some distinct values from a table (the specific column is of the nvarchar type). There are the sometimes the same va

4条回答
  •  不思量自难忘°
    2020-12-03 07:13

    SELECT DISTINCT
       CasedTheColumn 
    FROM
       (
       SELECT TheColumn COLLATE LATIN1_GENERAL_BIN AS CasedTheColumn
       FROM myTAble
       )FOO
    WHERE
       CasedTheColumn IN ('A', 'a'...)
    

提交回复
热议问题