SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for dept -- ---------------------------- DROP TABLE IF EXISTS `dept`; CREATE TABLE `dept` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `pname` varchar(5) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; ALTER TABLE dept PARTITION BY range(id) (partition p0 values less than (2), partition p1 values less than (4), partition p2 values less than (MAXVALUE)); select * from dept partition (p2); 就这样子。哈哈。

分类: web

标签: