HASH Partitioning street_2 VARCHAR(30), city VARCHAR(15), renewal DATE ) PARTITION BY RANGE COLUMNS(renewal) ( PARTITION pWeek_1 VALUES LESS THAN(’2010-02-09’), PARTITION pWeek_2 VALUES LESS THAN(’2010-02-15’), PARTITION pWeek_3 VALUES LESS THAN(’2010-02-22’), PARTITION pWeek_4 VALUES LESS THAN(’2010-03-01’) ); CREATE TABLE employees ( id INT NOT NULL, fname VARCHAR(30), lname VARCHAR(30), hired DATE NOT NULL DEFAULT ’1970-01-01’, separated DATE NOT NULL DEFAULT ’9999-12-31’, job_code INT, store_id INT ) PARTITION BY HASH(store_id) PARTITIONS 4; 4675 If you do not include a  PARTITIONS  clause, the number of partitions defaults to  1 ; using the  PARTITIONS keyword without a number following it results in a syntax error. You can also use an SQL expression that returns an integer for  expr . For instance, you might want to partition based on the year in which an employee was hired. This can be done as shown here: The following statement creates a table that uses hashing on the  store_id  column and is divided into 4 partitions: For simplicity, the tables in the examples that follow do not use any keys. You should be aware that, if a table has any unique keys, every column used in the partitioning expression for this table must be part of every unique key, including the primary key. See Section 24.6.1, “Partitioning Keys, Primary Keys, and Unique Keys” , for more information. To partition a table using  HASH  partitioning, it is necessary to append to the  CREATE TABLE  statement a PARTITION BY HASH ( expr )  clause, where  expr  is an expression that returns an integer. This can simply be the name of a column whose type is one of MySQL’s integer types. In addition, you most likely want to follow this with  PARTITIONS  num , where  num  is a positive integer representing the number of partitions into which the table is to be divided. Partitioning by  HASH  is used primarily to ensure an even distribution of data among a predetermined number of partitions. With range or list partitioning, you must specify explicitly which partition a given column value or set of column values should be stored in; with hash partitioning, this decision is taken care of for you, and you need only specify a column value or expression based on a column value to be hashed and the number of partitions into which the partitioned table is to be divided. See Section 13.1.20, “CREATE TABLE Statement” , for additional information about  PARTITION BY LIST COLUMNS()  syntax. In addition (as with  RANGE COLUMNS  partitioning), you can use multiple columns in the  COLUMNS() clause. See Section 24.2.3.1, “RANGE COLUMNS partitioning” , for more information. 24.2.4 HASH Partitioning Note