Is there a way to partition a mysql table, by range columns, where the 2 columns in question are of datetime...
0
I need to partition a table into 4 partitions, p0 to p3: with p0 having all rows with "id"=0, and p1 having all rows with "id"=1 and "doj" before february, and p2 having "id"=1 and "doj" before march, and partition "future" with others. The value for id, is guaranteed to be either 0 or 1 always. I've tried to come up with a solution and the following is what i arrived at: create table temp (id int not null primary key, doj datetime not null primary key) partition by range columns(id,month(doj)) (partition p0 values less than (1, 13), partition p1 values less than (2, 2), partition p2 values less than (2, 3), partition p3 values less than(maxvalue, maxvalue)); I get the following error when i try and execute the above sql command: ...