Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does N'text' really mean?

Status
Not open for further replies.

zakman

Programmer
Aug 15, 2001
49
US
I have seen a few examples that use N'....'
and I have not been able to find a description
of this in Books Online.

Some people say its for encryption, others say
it is used for unicode translation, or is it
something else?

Any ideas?

Thanks!
 
SQL 2000 BOL contains the following infomation under the topic "Constants."

Unicode strings

Unicode strings have a format similar to character strings but are preceded by an N identifier (N stands for National Language in the SQL-92 standard). The N prefix must be uppercase. For example, 'Michél' is a character constant while N'Michél' is a Unicode constant.
Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Also -

You should use the N prefix when refering to a value for a column whose type is nchar or nvarchar. As in:
Code:
UPDATE tbl_Customer 
  SET LastName = N'Jones'
WHERE CustomerID = 23

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top