Monday, March 19, 2012

How many chars in text field?

How many characters can you fit inside a text field with a length of 16.
How do you work this out?
Thanks
JF16 is only the size of the pointer which points to the actual data location.
Max size for the blob datatypes is approx 2GB.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jof" <john.fletcher@.servicedelivery.org.uk> wrote in message
news:8809e3fb.0403190333.1db6e042@.posting.google.com...
> How many characters can you fit inside a text field with a length of 16.
> How do you work this out?
> Thanks
> JF|||To add to Tibor's response, the reported column size for text/ntext/image
data is the maximum number of bytes which are actually stored in the data
page. The 16-byte value is the default (pointer to separate text/image
page) but is configurable in SQL 2000 with the 'text in row' table option.
This allows you to control how much data cam be stored with the row itself
but the max data size is still 2GB.
Hope this helps.
Dan Guzman
SQL Server MVP
"Jof" <john.fletcher@.servicedelivery.org.uk> wrote in message
news:8809e3fb.0403190333.1db6e042@.posting.google.com...
> How many characters can you fit inside a text field with a length of 16.
> How do you work this out?
> Thanks
> JF

No comments:

Post a Comment