#查看数据库是否支持分区
SHOW VARIABLES LIKE '%partition%'; #YES
#创建带分区的表
use wei101;
drop table if exists t1;
create table t1(
id int,
year_col int
); #创建带分区的表
PARTITION BY RANGE(year_col)(
PARTITION p0 VALUES LESS THAN(1991),
PARTITION p1 VALUES LESS THAN(2000),
PARTITION p2 VALUES LESS THAN(2010)
);
对表创建分区,但是出现Error Code: 1064. Partitioning can not be used stand-alone in
query near
在mysql workbench 5.2CE上运行的。
求指教!谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货