GNU Info

Info Node: (mysql.info)Other-vendor column types

(mysql.info)Other-vendor column types


Next: Storage requirements Prev: Choosing types Up: Column types
Enter node , (file) or (file)node

Using Column Types from Other Database Engines
----------------------------------------------

To make it easier to use code written for SQL implementations from other
vendors, MySQL maps column types as shown in the table below.  These
mappings make it easier to move table definitions from other database
engines to MySQL:

*Other vendor type*           *MySQL type*
`BINARY(NUM)'                 `CHAR(NUM) BINARY'
`CHAR VARYING(NUM)'           `VARCHAR(NUM)'
`FLOAT4'                      `FLOAT'
`FLOAT8'                      `DOUBLE'
`INT1'                        `TINYINT'
`INT2'                        `SMALLINT'
`INT3'                        `MEDIUMINT'
`INT4'                        `INT'
`INT8'                        `BIGINT'
`LONG VARBINARY'              `MEDIUMBLOB'
`LONG VARCHAR'                `MEDIUMTEXT'
`MIDDLEINT'                   `MEDIUMINT'
`VARBINARY(NUM)'              `VARCHAR(NUM) BINARY'

Column type mapping occurs at table creation time.  If you create a
table with types used by other vendors and then issue a `DESCRIBE
tbl_name' statement, MySQL reports the table structure using the
equivalent MySQL types.


automatically generated by info2www version 1.2.2.9