Re: Newbie question about BIGINT and INT in the same table

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Sun, 27 Oct 2019 11:07:31 -0400
Message-ID: <qp4bqs$q6t$1_at_jstuckle.eternal-september.org>


On 10/27/2019 6:09 AM, ^Bart wrote:

>> You use the size of variable you need. if the values in the age column 
>> are really going to exceed the time to the heat death of the universe, 
>> use a bigint

>
> Ok, now I understood, I could use for the age also VARCHAR(3) because it
> means I can insert in a row till three numbers (I know VARCHAR is for
> string but I could use also to insert numbers!) but the column's value
> is "infinity" so I could have a column of millions and millions of
> values but these values are till three items!
>
> The mistake was to think to the columns and not to the value of the row!
>
> Thanks!
> ^Bart

You do NOT want to store numeric data as strings. For one thing, sorting will be crap. '2' will be larger than '15'.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Sun Oct 27 2019 - 16:07:31 CET

Original text of this message