Mega Code Archive

 
Categories / MySQL Tutorial / Data Types
 

Data type mapping occurs at table creation time, after which the original type specifications are discarded

mysql> mysql> CREATE TABLE t (a BOOL, b FLOAT8, c LONG VARCHAR, d NUMERIC); Query OK, 0 rows affected (0.01 sec) mysql> mysql> DESCRIBE t; +-------+---------------+------+-----+---------+-------+ | Field | Type          | Null | Key | Default | Extra | +-------+---------------+------+-----+---------+-------+ | a     | tinyint(1)    | YES  |     | NULL    |       | | b     | double        | YES  |     | NULL    |       | | c     | mediumtext    | YES  |     | NULL    |       | | d     | decimal(10,0) | YES  |     | NULL    |       | +-------+---------------+------+-----+---------+-------+ 4 rows in set (0.00 sec) mysql> mysql> drop table t; Query OK, 0 rows affected (0.00 sec)