Re: VARCHAR ( n )

From: Thomas 'PointedEars' Lahn <PointedEars_at_web.de>
Date: Tue, 22 Nov 2016 21:10:07 +0100
Message-ID: <3061837.V25eIC5XRa_at_PointedEars.de>


Stefan Ram wrote:

> Axel Schwenke <axel.schwenke_at_gmx.de> writes:

>>                                        it is good practice to always use
>>the smallest possible data type

>
> The problem is that there often is no precise
> upper limit for the length of some kind of data (texts).

“Texts” as in the TEXT data type?  

> For example, a first name usually is no longer
> than 32 characters, but when one uses VARCHAR ( 32 ),
> it might happen that eventually someone with
> 33 characters in his first name comes along. So,
> one might use VARCHAR ( 33 ), but then someone
> with 34 characters might appear.

<https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/>  

-- 
PointedEars

Twitter: _at_PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
Received on Tue Nov 22 2016 - 21:10:07 CET

Original text of this message