December 21, 2005 at 2:07 pm
I have a table where some columns are definied as "nvarchar" when I try to insert something into this table it takes only half the character of it's size.
Example:
(1) When I do a "sp_help" on the table it shows
type = nvarchar , length= 100
(2) When I try to insert values it takes max 50 character in this column
(3) If I do a "generate sql script" then it shows nvarchar(50)
My question is why is it showing double size when I do "sp_help" compared to "generte script"
I will try to see if I can find original script to see how the table was created.
December 21, 2005 at 2:37 pm
sp_help reports the actual size of the column in bytes.
nvarchar is unicode, 2 bytes per character, therefore you can only store 50 characters in it, but the physical size of the column is 100 bytes.
December 21, 2005 at 2:44 pm
Thanks PW
Appreciate your help.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply