BLOB(TEXT)和VARCHAR的区别

BLOB and TEXT  differ from VARBINARY and VARCHAR in the following ways:

    *      There is no trailing-space removal for BLOB and TEXT columns when values are stored or retrieved. Before MySQL 5.0.3, this differs from VARBINARY and VARCHAR, for which trailing spaces are removed when values are stored.
           Note that TEXT is on comparison space extended to fit the compared object, exactly like CHAR and VARCHAR.
    *      For indexes on BLOB and TEXT columns, you must specify an index prefix length. For CHAR and VARCHAR, a prefix length is optional. See Section 7.4.3, “Column Indexes”.
    *      BLOB and TEXT columns cannot have DEFAULT values.
 

你可能感兴趣的:(Mysql)