Is it good practice to set all text fields to nvarchar(MAX)? if im not sure what the size of the field will be
will it take up extra space
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.
varchar(max) won’t take extra space.
One dangerous thing about varchar(max) is that someone can potentially but a huge amount of data in it. This can hurt if a malicious user. or faulty program, enters a 1MB address line. No client or web application will expect that, and it might cause them to crash.
So, as a best practice, create varchar fields with a specified maximum length.