string datatype
-
Saturday, August 20, 2005 3:25 AMWhat's the difference bewteen string datatype char and nchar ?
And what's the difference between string literal with single quote only 'xxx' and with an leading N letter N'xxx' ?
All Replies
-
Saturday, August 20, 2005 5:33 AM
Here is detail on these datatypes:
nchar/nvarchar:
http://msdn.microsoft.com/library/en-us/tsqlref/ts_na-nop_9msy.asp
char/varchar:
http://msdn.microsoft.com/library/en-us/tsqlref/ts_ca-co_7tpu.asp
-
Saturday, August 20, 2005 9:30 AM
The n prefix for data types means the data type is unicode. Unicode supports a wider range of characters and more space is needed to store Unicode characters.
A preceding n in a string literal make it a unicode constant.

