One thought on “Is it better to use varchar(400) vs varchar(7000)?”
It will not make a difference to use varchar(7000) vs varchar(400), at least from a sql server processing standpoint. It is something that can be used to assist with data validation in sql server, and is truly more of a “good practice” kind of thing to define a maximum length that a field should hold. Nowadays it’s more habit than anything else, but this used to be a more important distinction for when your data interacted with other systems or user interfaces where field length was critical.
It will not make a difference to use varchar(7000) vs varchar(400), at least from a sql server processing standpoint. It is something that can be used to assist with data validation in sql server, and is truly more of a “good practice” kind of thing to define a maximum length that a field should hold. Nowadays it’s more habit than anything else, but this used to be a more important distinction for when your data interacted with other systems or user interfaces where field length was critical.