Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList
生活随笔
收集整理的這篇文章主要介紹了
Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
邏輯庫結構和物理庫表結構如下(邏輯庫結構=物理庫表結構):
CREATE TABLE `order_key` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主鍵',`goods_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品名稱',`place` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下單地點',`make_date` date NULL DEFAULT NULL COMMENT '下單日期',`make_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下單時間',`modify_date` date NULL DEFAULT NULL COMMENT '修改日期',`modify_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改時間',`gender` int(1) NULL DEFAULT NULL COMMENT '性別',`status` int(1) NULL DEFAULT NULL COMMENT '上下架 0-上架 1-下架',`user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用戶名稱',`user_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用戶電話',PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '訂單表' ROW_FORMAT = Dynamic;在mycat中插入數據如下:
INSERT INTO `order_key` VALUES (1, '蘋果1', '上海1', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕1', '1'); INSERT INTO `order_key` VALUES (2, '蘋果2', '上海2', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕2', '2'); INSERT INTO `order_key` VALUES (3, '蘋果3', '上海3', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕3', '3'); INSERT INTO `order_key` VALUES (4, '蘋果4', '上海4', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕4', '4'); INSERT INTO `order_key` VALUES (5, '蘋果5', '上海5', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕5', '5'); INSERT INTO `order_key` VALUES (6, '蘋果6', '上海6', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕6', '6'); INSERT INTO `order_key` VALUES (7, '蘋果7', '上海7', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕7', '7'); INSERT INTO `order_key` VALUES (8, '蘋果8', '上海8', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕8', '8'); INSERT INTO `order_key` VALUES (9, '蘋果9', '上海9', '2019-08-25', '15:44:32', '2019-08-25', '15:44:32', 1, 0, '雨昕9', '9'); INSERT INTO `order_key` VALUES (10, '蘋果10', '上海10', '2019-08-25', '15:44:32', '2019-07-21', '15:44:32', 1, 0, '雨昕10', '10');異常信息如下:
INSERT INTO `order_key` VALUES (10, '蘋果10', '上海10', '2019-082-5', '15:44:32', '2019-07-21', '15:44:32', 1, 0, '雨昕10', '10'); ERROR 1064 (HY000): partition table, insert must provide ColumnList解決方案:
插入數據是要指定列名
正確插入sql語句如下:
截圖附上:
總結
以上是生活随笔為你收集整理的Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Jenikns新建节点、配置节点、新建任
- 下一篇: find VS not looking