3

I was asked an interesting question today. I've thought about it before but couldn't come up with a good answer.

If the values of a column are only going to be <= 255 characters, is there any real difference between using varchar(255) and varchar(max).

I realize that varchar(255) has a limit of 255 characters and varchar(max) 2 gb but they only use as much space as needed for the actual values stored. I'm not counting the extra space needed for the var part because as far as I know it's the same (or is it?). So in terms of performance & space is there a difference?

marked as duplicate by Aaron Bertrand sql-server Apr 25 '18 at 22:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.