what is the suitable data type to save string more than 8000 character in SQL database?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For SQL Server 2005+
varchar(max)ornvarchar(max)depending on whether you need to save as unicode or not.If you don’t have this requirement (or anticipate ever needing it) the
varcharoption is more space efficient.You don’t give a specific version of SQL Server in your question. Pre 2005 it would have been the
textdatatype.NB: In answer to your comment use ‘varchar(max)’ exactly as written. Don’t substitute a number in for “max”!