I am designing a query using the Query Editor in SQL server.
I am querying a table and putting a filter on a nvarchar column.
If I type a value into the filter column, for example '12', the editor changes it to N'12'.
why is it doing this? What does the "N" signify?
Microsoft SQL Server 2008
Last Comment
dsoderstrom
8/22/2022 - Mon
Jim Horn
N (nchar, nvarchar, ntext) signifies Unicode, meaning it handles a larger number of characters then non-unicode, and each character takes two bytes in memory instead of one.
Typically this is needed when dealing with foreign language collations.
>If I type a value into the filter column, for example '12', the editor changes it to N'12'.
Curiosity overwhelms me ... if you have a column that you'd want to filter on '12', then why is it a character data type as opposed to numeric?
dsoderstrom
ASKER
So, can I strip out this N and get the same results?
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Typically this is needed when dealing with foreign language collations.
>If I type a value into the filter column, for example '12', the editor changes it to N'12'.
Curiosity overwhelms me ... if you have a column that you'd want to filter on '12', then why is it a character data type as opposed to numeric?