1.插入报错
"sspu@192.168.1.11">insert into my_test2 values(18,'xsq18','四川省');
ERROR 1064 (HY000): partition table, insert must provide ColumnList
2.解决方法
必须写列的列表。
insert into my_test2 (id,name, region)values(18,'xsq18','四川省');
"sspu@192.168.1.11">insert into my_test2 (id,name, region)values(18,'xsq18','四川省');
Query OK, 1 row affected (0.01 sec)
3.总结
枚举值分库分表,插入数据时需要指定列名插入。