mysql 分区表 的创建

    技术2025-06-12  45

    创建完成的分区表CREATE TABLE `employees` (  `id` int(11) NOT NULL,  `fname` varchar(30) DEFAULT NULL,  `lname` varchar(30) DEFAULT NULL,  `hired` date NOT NULL DEFAULT '1970-01-01',  `separated` date NOT NULL DEFAULT '9999-12-31',  `job_code` int(11) NOT NULL,  `store_id` int(11) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1/*!50100 PARTITION BY RANGE (store_id)(PARTITION p0 VALUES LESS THAN (6) ENGINE = MyISAM,PARTITION p1 VALUES LESS THAN (11) ENGINE = MyISAM,PARTITION p2 VALUES LESS THAN (16) ENGINE = MyISAM) */ |

     

    /*!50100 注意这个这是用来限制版本的,低于标示版本的会忽略此段

    mysql> select /*!40100 now()*/;+---------------------+| now()               |+---------------------+| 2009-06-15 21:37:09 |+---------------------+1 row in set (0.00 sec)mysql> select /*!50100 now()*/;ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1mysql> select version();+------------+| version()  |+------------+| 4.1.18-log |+------------+1 row in set (0.00 sec)

    最新回复(0)