Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 N in where clause

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-01-28 : 08:19:48
CK writes "When writing queries in Enterprise Manager, my code is automatically cleaned up when the query is processed. I noticed that in my where clause it adds an 'N'. For example, if I write "WHERE [Policy/Group Number] = '80208'" my code will be updated to "WHERE ([Policy/Group Number] = N'80208')".

So what is the purpose of the N placed before the 80208?

Thanks"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-01-28 : 09:32:57
N stand for unicode so it can recognize non standard characters.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

SqlStar
Posting Yak Master

121 Posts

Posted - 2005-02-01 : 06:40:01
My long-time doubt is cleared... :) Thanks

:) While we stop to think, we often miss our opportunity :)
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2005-02-01 : 07:58:02
in fact

N'<some string>' stands for cast('<some string>' as nvarchar())

... just kind of an abbreviation.
Go to Top of Page
   

- Advertisement -