Re: VARCHAR ( n )

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Tue, 22 Nov 2016 10:29:19 -0500
Message-ID: <o11o74$a93$1_at_jstuckle.eternal-september.org>


On 11/22/2016 8:27 AM, Stefan Ram wrote:
[Quoted] > 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).
>
> 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.
>
> (This might be related to the
>
> en.wikipedia.org/wiki/Sorites_paradox
>
> .) See also,
>
> Keihanaikukauakahihuliheekahaunaele
>

Sure there is an upper limit - it's whatever you specify. If someone has a 33 character first name, he/she is used to this. Don't try to cover every possibility - it's impossible because you have limits. The most common limit I've seen for first and last names is around 16 characters. I don't think I've ever seen anything greater than 32 characters - although I'm sure it exists.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Tue Nov 22 2016 - 16:29:19 CET

Original text of this message