CREATE TABLE Statement Used to access a collection of identical  MyISAM  tables as one. This works only with  MERGE  tables. See Section 16.7, “The MERGE Storage Engine” . You must have  SELECT ,  UPDATE , and  DELETE  privileges for the tables you map to a  MERGE  table. Formerly, all tables used had to be in the same database as the  MERGE  table itself. This restriction no longer applies. partition_options  can be used to control partitioning of the table created with  CREATE TABLE . Not all options shown in the syntax for  partition_options  at the beginning of this section are available for all partitioning types. Please see the listings for the following individual types for information specific to each type, and see Chapter 24,  Partitioning , for more complete information about the workings of and uses for partitioning in MySQL, as well as additional examples of table creation and other statements relating to MySQL partitioning. Partitions can be modified, merged, added to tables, and dropped from tables. For basic information about the MySQL statements to accomplish these tasks, see Section 13.1.9, “ALTER TABLE Statement” . For more detailed descriptions and examples, see Section 24.3, “Partition Management” . If used, a  partition_options  clause begins with  PARTITION BY . This clause contains the function that is used to determine the partition; the function returns an integer value ranging from 1 to  num , where  num  is the number of partitions. (The maximum number of user-defined partitions which a table may contain is 1024; the number of subpartitions—discussed later in this section—is included in this maximum.) The expression ( expr ) used in a  PARTITION BY  clause cannot refer to any columns not in the table being created; such references are specifically not permitted and cause the statement to fail with an error. (Bug #29444) Hashes one or more columns to create a key for placing and locating rows.  expr  is an expression using one or more table columns. This can be any valid MySQL expression (including MySQL functions) that yields a single integer value. For example, these are both valid  CREATE TABLE  statements using PARTITION BY HASH : You may not use either  VALUES LESS THAN  or  VALUES IN  clauses with  PARTITION BY HASH . PARTITION BY HASH  uses the remainder of  expr  divided by the number of partitions (that is, the modulus). For examples and additional information, see Section 24.2.4, “HASH Partitioning” . 2561 CREATE TABLE t1 (col1 INT, col2 CHAR(5)) PARTITION BY HASH(col1); CREATE TABLE t1 (col1 INT, col2 CHAR(5), col3 DATETIME) PARTITION BY HASH ( YEAR(col3) ); Note • HASH( expr ) • PARTITION BY • UNION Table Partitioning Note