SQLTeam.com | Weblogs | Forums

T-sql 2012 datatype


In sql server 2012, I would like to know what datatype can hold the maximum number of characters? (The datatype will need to contain letters, numbers, and potentially any special characters.)

In addition, to insert, update and delete data from this datatype, is there any special t-sql that is required?
I am asking this question since I know sql server 2000 had the blob datatype and that required some 'special' t-sql to update the data in this data type.

In addition, would you tell me what other few datatypes are available and what the maximum number of characters each datatype can hold?

**Note, I do not need any data that contains 'N' values since I am only working with data where people speak English.


You would use VARCHAR(MAX). See here

More info about SQL 2012 data types here.


You can use varchar(max). Nothing special about it, just that it's huge. I'll leave it to you to google how big it is.


Will I have a performance problem using this field instead of separating the column into 8 different columns?


If they can be separated, then they should be separated. Give us more details.


The categories are based upon state statues. This are each comments on how the child has attendance problems.


Will the varchar(max) column be used for a single comment per row? Or are you concatenating them together? I'm unclear what its usage is. Maybe sample data would help.