4 messages in com.mysql.lists.gui-toolsColumn Type Confusion
FromSent OnAttachments
Jim McAtee04 Jul 2003 11:39 
Adam Hooper04 Jul 2003 11:45 
Jim McAtee04 Jul 2003 12:49 
Jim McAtee08 Jul 2003 17:26 
Subject:Column Type Confusion
From:Jim McAtee (jmca@mediaodyssey.com)
Date:07/04/2003 11:39:26 AM
List:com.mysql.lists.gui-tools

I'm fairly new to MySQL and MySQL CC. My question regards what I'm seeing and creating in MySQL CC, mostly in regard to the various integer data types.

In the SQL docs, for instance, it says that a tinyint is 8 bits (-127 to 128, or 0 to 255 unsigned). When I create a tinyint in MySQLCC, the display shows tinyint(4). I assume this is bits, not bytes, but I'm not certain. I would expect it to either display (1) byte or (8) bits.

Similarly, for an int it show int(11). If bytes, that would seem extremely large, but it's smaller than the 16 bits shown in the documentation.

I'm also a bit confused about being able to change the length in MySQL CC. I would have thought that each type was fixed in size. If the above lengths are just default lengths (in bits) and if the lengths are highly flexible in MySQL, then the values chosen seem odd. I would expect more common default lengths that align on byte boundaries.

Any clarification would be apprectiated, Jim