How to partition a MySQL table based on char column?
问题 Is it possible to partition based on char column? After reviewing the MySQL 5.1 documentation it appears that only integer types can be used. Is this correct? Or can I use some function to convert the char into an integer? The char field in question contains a unique identifier. 回答1: Partitioning in MySQL 5.1 can only deal with integer columns (Source). You can only use a few partitioning functions on non-integer columns. For example: CREATE TABLE ti (id INT, amount DECIMAL(7,2), tr_date DATE