And what could that be good for?
Anyway, see Rules for Regular Identifiers, emoji's are not allowed in object/column names.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm having a problem in SQL server when using emojis in column aliases:
with [cte] AS (
SELECT
NULL AS [π]
,NULL AS [ππ€’]
)
SELECT [π] FROM [cte]
Msg 8156, Level 16, State 1, Line 1
The column 'ππ€’' was specified multiple times for 'cte'.
Completion time: 2023-03-13T08:44:20.3825178-04:00
Certain emojis work as expected. This query executes successfully:
with [cte] AS (
SELECT
NULL AS [π]
,NULL AS [πβ€]
)
SELECT [π], [πβ€] FROM [cte]
Tested on SQL Server up to version 2022: 16.0.1000.6
And what could that be good for?
Anyway, see Rules for Regular Identifiers, emoji's are not allowed in object/column names.
Changing DB collation from SQL_Latin1_General_CP1_CI_AS to Latin1_General_100_CI_AS_SC resolved this issue.