MySQL表结构是10行,Esclipse连接数据库执行插入语句:
Python code
sql1="""insert into tdxtb_user values('220195','123456','123456','13476123050','1100','测试559','1','2','safeguard','2012-04-09');""";#insert
cur.execute(sql1);
报错:_mysql_exceptions.OperationalError: (1136, "Column count doesn't match value count at row 1")
但问题是在MySQL新建查询输入该SQL语句:
SQL code
insert into tdxtb_user values('220195','123456','123456','13476123050','1100','测试559','1','2','safeguard','2012-04-09')
插入成功,且将原来Esclipse上执行的语句的10个插入数据增加到11个,如下:
SQL code
('220195','123456','123456','13476123050','1100','测试559','1','2','1','safeguard','2012-04-09')
竟执行成功?!
这个就很费解,求大神解答!!不胜感激!!
--转自