Olaf, not a silly question at all. You can indeed save space by using different forms of integer.
See http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html and http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
From that second page:
Storage Requirements for Numeric Types Data Type Storage Required TINYINT 1 byte SMALLINT 2 bytes MEDIUMINT 3 bytes INT, INTEGER 4 bytes BIGINT 8 bytes You may also be able to use UNSIGNED to extend the range of a column, if you don't need to store negative values. HTH, Dan On 1/5/07, Olaf Stein <[EMAIL PROTECTED]> wrote:
Hi All, I have somewhat of a silly question. If I define a column as int it needs 4 bytes. Do I gain anything space wise if I restrict the length to e.g. 10, int(10), or is this only a logical restriction? Thanks Olaf
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]