In SQL Server, the query
SELECT custid, country, region, city
FROM Sales.Customers
WHERE region = N'WA'
what is the meaning of ‘N’ in the where clause? I remove it, get same result.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unicode string constants that appear in code executed on the server, such as in stored procedures and triggers, must be preceded by the capital letter
N. This is true even if the column being referenced is already defined as Unicode. Without theNprefix, the string is converted to the default code page of the database. This may not recognize certain characters.For example, the stored procedure created in the previous example can be executed on the server in the following way:
The requirement to use the
Nprefix applies to both string constants that originate on the server and those sent from the client.