tags:

views:

898

answers:

4

When I create a new VARCHAR column in Microsoft SQL Server Manager Studio, it defaults to 50 length. Does this length have some special meaning? If theoretically I have the option to choose for a length between 30 and 70, is isn't it better to go for defaults that are power of 2 (like 32, or 64 in this case)?

+1  A: 

Why is the sky blue? ;)

kenny
Well there is an explanation for that: http://www.sciencemadesimple.com/sky_blue.htmlSo I hope there is also an explanation for my question, or maybe indeed it was some person who decided that his lucky number should be the default value, but then again that is also an explanation... :)
Gidon
Hmmm, yeah I'm surprised it's not 42.
kenny
+1  A: 

Powers of 2 are meaningless when it comes to the possible lengths of strings.

Robin Day
+3  A: 

Because its a nice small round number... Seriously I would think that its pretty arbitrary decision that was made.

Eoin Campbell
A: 

It's more efficient if string datatypes of fewer than 50 characters are declared as CHAR() rather than VARCHAR()