Someone else asked this and got referred to a Discussion that didn't
address the question so I'm going to ask again.
If you have a column that typically is going to be less than 12
characters in length, the obvious choice would be to use a
varchar(12). However, what is the drawback to using something
larger.....like varchar(30)?
Thanks in Advance.
Ryan Putman
Andrew J. Kelly - 04 Mar 2008 01:28 GMT
None really, the overhead for a variable length column is there regardless.
But if the data should never be more than 12 chars in length by making the
column larger you risk someone putting bad data in.

Signature
Andrew J. Kelly SQL MVP
Solid Quality Mentors
> Someone else asked this and got referred to a Discussion that didn't
> address the question so I'm going to ask again.
[quoted text clipped - 6 lines]
> Thanks in Advance.
> Ryan Putman
TheSQLGuru - 04 Mar 2008 14:46 GMT
Actually the choice to use var or not depends on what is being put into the
column, expecially the average length of the values. If every value is
either 11 or 12 chars in length you should use a char(12) not a varchar.
This is more efficient both from a processing and storage standpoint.

Signature
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
> Someone else asked this and got referred to a Discussion that didn't
> address the question so I'm going to ask again.
[quoted text clipped - 6 lines]
> Thanks in Advance.
> Ryan Putman