Inspectopedia
 
2024.3

Unicode usage in SQL

Warning
New
Last modified: 03 December 2024

Reports string literals that use national characters without the N prefix.

Without the N prefix, the string is converted to the default code page of the database. This default code page may not recognize certain characters. For more information, see nchar and nvarchar (Transact-SQL) at docs.microsoft.com.

Example (Microsoft SQL Server):

The SELECT 'абвгд' AS c; does not have the N prefix, the 'абвгд' part will be highlighted.