July 14, 2016 at 12:18 pm
In sql server 2012, I want to allow a user to enter data into large columns that are used for different types of comments.
The largest varchar field that I am allowed to use is varchar(8000). I do not want to use varchar(max) since that will be deprecated at some point.
The datatypes only need to be used for within the United States (English).
Thus would you let me know what the largest field size is that I can use?
July 14, 2016 at 12:21 pm
wendy elizabeth (7/14/2016)
In sql server 2012, I want to allow a user to enter data into large columns that are used for different types of comments.The largest varchar field that I am allowed to use is varchar(8000). I do not want to use varchar(max) since that will be deprecated at some point.
The datatypes only need to be used for within the United States (English).
Thus would you let me know what the largest field size is that I can use?
Can you point me to a reference which talks of varchar(max) being deprecated, please?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
July 14, 2016 at 12:32 pm
wendy elizabeth (7/14/2016)
In sql server 2012, I want to allow a user to enter data into large columns that are used for different types of comments.The largest varchar field that I am allowed to use is varchar(8000). I do not want to use varchar(max) since that will be deprecated at some point.
The datatypes only need to be used for within the United States (English).
Thus would you let me know what the largest field size is that I can use?
Are you getting confused with text/ntext which are depreciated? varchar(max) and nvarchar(max) are the recommended replacements for these so no reason why they shouldn't be used.
July 15, 2016 at 8:45 am
I'm pretty sure you asked this question once already. Everyone suggested you use VARCHAR(MAX) but not TEXT, because TEXT is deprecated. Here's the documentation on VARCHAR. It stores up to 2gb of information. That should be enough for any comments field.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 15, 2016 at 11:53 am
I'll recommend again that you get a copy of Books Online (BOL for short) and use it. It clearly stated under the TEXT datatype that it is what has been deprecated and not VARCHAR(MAX). Learn to use the "INDEX" feature. It will save you much heartache and wasted time.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply