The N syntax is how you specify a Unicode string literal in SQL Server.
N'Unicode string' 'ANSI string'
SQL Server will automatically convert between them whenever possible, using either column sorting or database sorting.
So, if your string literals do not actually contain Unicode characters, you do not need to specify the N prefix.
But if your do string literals contain Unicode characters, then you must use the N prefix.
source share