May 2003
Intermediate to advanced
592 pages
14h 28m
English
Selecting the proper column type for your tables is key to a successful database. Table C.12 lists the different string, number, and other types you can use, along with how much space they will take up on the server’s hard drive. When choosing a type for each column, you should use the most efficient (i.e., the most size-frugal) data type based upon what the largest value of the column could be.
| MySQL Data Types | ||
|---|---|---|
| TYPE | SIZE | DESCRIPTION |
| CHAR[Length] | Length bytes | A fixed-length field from 0 to 255 characters long |
| VARCHAR(Length) | String length + 1 bytes | A fixed-length field from 0 to 255 characters long |
| TINYTEXT | String length + 1 bytes | A string with a maximum length of 255 ... |