The behavior of only using the Database’s Collation is consistent with what we saw in the first test.
We can check what happens when we an explicit Collation is applied.
This is, again, due to the Collation of the Database being used.
That makes sense here since there is no column being referenced.
In addition to updating the existing wording, I figured it would be nice to link to the page showing how to string multiple conditions together, just like in the When referencing the Unicode character data types nchar, nvarchar, and ntext, ‘expression’ should be prefixed with the capital letter ‘N’. A Stored Procedure is being used since we will execute it several times. Check Conversions AS SET NOCOUNT ON; SELECT -- "Uni" == Unicode [Latin1_8bit] AS [Latin1], [Hebrew_8bit] AS [Hebrew], [Korean_8bit] AS [Korean], N'█' AS [█], -- visual group separator ( Full Block U 2588 ) IIF([Latin1_8bit] = '₂', 'Match', '') AS [Latin1], IIF([Latin1_Unicode] = '₂', 'Match', '') AS [Latin1_Uni], IIF([Hebrew_8bit] = '₂', 'Match', '') AS [Hebrew], IIF([Hebrew_Unicode] = '₂', 'Match', '') AS [Hebrew_Uni], IIF([Korean_8bit] = '₂', 'Match', '') AS [Korean], IIF([Korean_Unicode] = '₂', 'Match', '') AS [Korean_Uni] FROM dbo. Which Collation Is It; prefixed with a capital-“N” only matches a regular number “2”.
Well, in order to find out if it is one or the other or both or even neither, we will consult the primary authority on this topic: SQL Server. Which Collation Is It ( [Latin1_8bit] VARCHAR(10) COLLATE Latin1_General_100_BIN2, [Latin1_Unicode] NVARCHAR(10) COLLATE Latin1_General_100_BIN2, [Hebrew_8bit] VARCHAR(10) COLLATE Hebrew_100_BIN2, [Hebrew_Unicode] NVARCHAR(10) COLLATE Hebrew_100_BIN2, [Korean_8bit] VARCHAR(10) COLLATE Korean_100_BIN2, [Korean_Unicode] NVARCHAR(10) COLLATE Korean_100_BIN2 ); ) because it behaves differently in each of the three Collations that we are testing with.Which Collation Is It; SELECT * FROM #Conversion Test; That returns the following: The referenced column being of a Code Page that contains the character did not help in either case, once again showing that the string literal is translated first, using the Collation of the current Database.Not convinced that the resulting Collation is the column’s Collation?That’s easy to check (and is why the query creates a table to store the results in): prefixed with a capital-“N”) are always forced into the Code Page specified by the Database’s Collation.And, we haven’t seen the Collation of the referenced column have any effect.