1 2 3 4 5 6 7 8 9 10 11 12 13
| CREATE TABLE `kerns_test2` ( `id` int NOT NULL, `name` varchar(50) DEFAULT NULL, `create_time` date NOT NULL, PRIMARY KEY (`id`,`create_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 PARTITION BY RANGE (year(`create_time`)) (PARTITION p0 VALUES LESS THAN (1990) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1995) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (2000) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2010) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN (2015) ENGINE = InnoDB);
|