Inspectopedia 2025.2 Help

Unicode usage in SQL

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):

SELECT 'abcde' AS a; SELECT N'abcde' AS b; SELECT 'абвгд' AS c; SELECT N'абвгд' AS d;

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

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

SqlUnicodeStringLiteral
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | SQL

Inspection ID: SqlUnicodeStringLiteralInspection

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection SqlUnicodeStringLiteral

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Last modified: 18 September 2025