October 26, 2003 at 7:17 pm
What difference between these two data types?
October 27, 2003 at 12:30 am
nchar is a unicode datatype an uses two bytes per character.
Check "Data Types" topic in Books Online.
Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface
--------------------
Colt 45 - the original point and click interface
October 27, 2003 at 12:56 am
Piggy-backing on Phill's answer, this might illustrate it
DECLARE @a NCHAR(15)
DECLARE @b CHAR(15)
SET @a='Why Unicode?'
SET @b = @a
SELECT DATALENGTH(@a)as DoubleSize, DATALENGTH(@b) as NotDoubleSize
Frank
Edited by - Frank Kalis on 10/27/2003 12:56:16 AM
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
October 27, 2003 at 12:57 am
Sorry, you should see something like
DoubleSize NotDoubleSize
----------- -------------
30 15
(1 row(s) affected)
Frank
Edited by - Frank Kalis on 10/27/2003 12:58:00 AM
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply