Showing posts with label body_text. Show all posts
Showing posts with label body_text. Show all posts

Tuesday, February 14, 2012

Character count limit?

Does anyone know what the character count limit is for a SQL table? We have a table with a column called body_text. It contains characters from a story we publish every day. Example:

News from Canada and Turkey

We get our weekly news update from

our Canadian correspondent, Vaughn Palmer. Plus, the Pope is in Turkey.

The visit is provoking opposition from secular nationalists and

Islamists. We talk to a reporter in Istanbul. Also, our weekly

listener's forum.

I did a word count in MS Word. This paragraph is 275 characters long. I found this in the only SQL book I currently have called Beginning SQL Server 2005. I found a snippet I thought might be related to my question.

Char

The char data type is fixed in length. If you define a

column to be 20 characters long, then 20 characters will be stored. If you

enter less then the number of characters defined, the remaining length will be

space filled to the right. Therefore, if a column were defined as char (10),

"aaa" would be stored as "aaa

". Use the data type when the column data is to be of fixed length,

which tends to be the case for customer IDs and bank account IDs.

So what is the official answer?

Assuming that your actual question is:

"Does anyone know what the character count limit is for a SQL table?"

In Sql Server 2k the limit for in-row-data is 8060. if you want to store more than that you will have to use a data type which is stored off-row like text.
In SQL 2k the limit for in row-data is also 8060, but you can take advantage of tnew data types which extend the VARCHAR /NVARCHAR types to a max of 4GB/2GB.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||Cool thanks!