简体   繁体   中英

SQL_Hungarian_CP1250_CI_AS behaves as case sensitive

SQL_Hungarian_CP1250_CI_AS behaves as case sensitive although the collation is CI (case insensitive). The root cause for it is that the Hungarian Language which has 2 families of Hungarian in SQL Server.

select * from sys.objects where name like 'myTablE'

no rows are received

select * from sys.objects where name like 'myTablE' COLLATE SQL_Latin1_General_CP1_CI_AS

1 row selected

When I used the Hungarian_Technical_CI_AS, I was able to see results: (second family of Hungarian in SQL)

select * from sys.objects where name like 'myTablE' COLLATE Hungarian_Technical_CI_AS

Is it a bug ?

Apparently, the non-technical Hungarian collation is notorious for use in queries, and the technical collation is generally preferred. This is because some letters are contracted to form new letters that only appear in the Hungarian alphabet, such as sz .

I found more information on an MSDN forum and here on StackOverflow .

General consensus: use the technical collation when at all possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM