问题
I using SQL Server 2016 and have one database with Arabic_100_CI_AS and I inserted apple emojis to my database but some of emojis are equals in condtions but other emojis are not equal
select 1
where N'⛑' = N'✅'
or
select 1
where N'✊' = N'⭐️'
This emojis are equals:
✊ ✋ ⛑ ⭐️ ✨ ⛅️ ⛈ ⛄️ ⚽️ ⚾️ ⛳️ ⛸ ⛷ ⛹️ ⛵️ ⛴ ⛽️ ⛲️ ⛱ ⛰ ⛺ ⛪️ ⛩ ⏱ ⏲ ⏰ ⏳ ⛏ ⛓ ⛎ ❌ ⭕️ ⛔️ ❗️ ❕ ❓ ❔ ✅ ❎ ⏸ ⏯ ⏹ ⏺ ⏭ ⏮ ⏩ ⏪ ⏫ ⏬ ➕ ➖ ➗ ➰ ➿ ⬛️ ⬜️
回答1:
As Mr. Martin Smith suggest try to collate them with help of Arabic, binary sort
select 1
where N'⛑' = N'✅' collate Arabic_BIN
or
select 1
where N'✊' = N'⭐️' collate Arabic_BIN
To answer your question : The equality of your emojis are dependent on collation.
来源:https://stackoverflow.com/questions/48194048/why-some-emojis-in-sql-server-are-equal