萬盛學電腦網

 萬盛學電腦網 >> 數據庫 >> mysql教程 >> Mycat+Mysql 插入數據報錯 i[Err] 1064

Mycat+Mysql 插入數據報錯 i[Err] 1064

Mycat+Mysql 插入數據報錯 i[Err] 1064是必須所以字段都要加了了小編下面就來為各位介紹一下吧,但為什麼要這樣小編也沒找到具體的辦法哦。


使用Navicat連接Mycat 8066 成功插入了分庫表和全局表

1、全局表 sql如下:

INSERT INTO `t_rank` VALUES ('259bfdc3-7922-4839-96c7-61c89e877dc5', '法國', '7', '11', '11', '12', null, '34');
INSERT INTO `t_rank` VALUES ('41eece5d-9d86-4cfe-b0ce-e6d4e4021cac', '中國', '2', '38', '27', '23', null, '88');
INSERT INTO `t_rank` VALUES ('4ae59e99-5f41-4a68-af07-65c15f72b247', '韓國', '5', '13', '8', '7', null, '28');
插入成功!

2、分庫表 sql如下:

INSERT INTO `t_user_label` VALUES ('00041fc4-5947-11e6-a45d-fa163ee05659', '1ae56f42-dd56-4c00-9cf7-c580f428e20d', '0', null, '工作', '13', null, '1470207308693', '1470207308693', null, null, null, null);
INSERT INTO `t_user_label` VALUES ('00067f28-594c-11e6-a45d-fa163ee05659', '95dc53e0-de02-41fd-85a6-3da25caba599', '0', null, '工作', '13', null, '1470209456275', '1470209456275', null, null, null, null);
INSERT INTO `t_user_label` VALUES ('0006d1a6-5947-11e6-a45d-fa163ee05659', '1ae56f42-dd56-4c00-9cf7-c580f428e20d', '0', null, '生活', '3', null, '1470207308711', '1470207308711', null, null, null, null);
本想這些sql是從mysql導出的,應該不會出錯,但是執行的時候報錯

[Err] 1064 - partition table, insert must provide ColumnList

看意思是要sql提供要插入的表明,但是我是全列插入,所以不理解為什麼?

3、解決辦法:

我把所有的列明都添加上,發現添加成功:

INSERT INTO t_user_setting(ACCOUNT_ID,ACCOUNT_NAME,CTAG,ACCOUNT_TYPE,ACCOUNT_STATUS,REGIST_CHANNEL,REGIST_TIME,ACTIVE_CHANNEL,ACTIVE_TIME,CALENDAR_VIEW,WEEK_FORMAT,REPEAT_VIEW,USER_LABEL_NAME,USER_LABEL_COLOR,PROVINCE,MEAL,IS_NEED_REMIND,REMIND_TYPE,REMIND_TIME_AHEAD,CREATE_TIME,LAST_UPDATE_TIME,LAST_LOGIN_TIME) VALUES ('0006f1b5-956d-4b2d-a3d7-baa10174b841', '[email protected]', '0', '0', '2', null, '1469936755211000', null, null, '1', '0', '1', '[email protected]', '9', null, null, '1', '{\"sms\":0,\"email\":1}', '600000', '1469936755211000', '1469936755211', null);

 

copyright © 萬盛學電腦網 all rights reserved