Sorry I forgot to add one more question.. Consider this as continuation to the above question.
Also I would like to know --> For example if I define Table A with only two columns Column A & Column B whose datatype is char(8000), char(8000) respectively and keeping in mind that row size/page size cannot exceed 8192 bytes(with header), 8060 without header. what will actually get stored on my 8 KB page. How will it treat column A and column B? What would be the size of my single row in Table A?
Main Topics
Browse All Topics





by: BrandonGalderisiPosted on 2009-01-12 at 10:41:05ID: 23355944
The max sizes can be found by looking in master.sys.systypes.
en-us/libr ary/ ms1724 24(SQL.90) .aspx
for varchar, the length is the bytes. so varchar(50) = 50 bytes
for nvarchar, the length*2 is the bytes. so nvarchar(50) = 100 bytes
I'm not sure on the size of text and ntext but they really shouldn't be used.
Here's a MS article on it. I've filled in some below.
http://msdn.microsoft.com/
Select allOpen in new window