mysql插入数据不成功,核对字段及类型了,无误,怎么回事? id为AUTO_INCREMENT
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql插入数据不成功,核对字段及类型了,无误,怎么回事? id为AUTO_INCREMENT相关的知识,希望对你有一定的参考价值。
insert into publish (number,user,name,phone,title,content,list,things,quality,glance,trad,classify,city_id,exchange,town_id,town,ex_he,my_ex,photo,ip,time) values (1,'2','3',4,'5','6',7,'8','9',10,'11','12',13,'14',15,'16','17','18',19,20,21)
这表结构字段属性设计的很糟糕,建议修改!mysql> create table publish (number int(8),user varchar(20),name varchar(20),phone int(12),title text,content text ,list int(1),things varchar(20),quality varchar(20),glance int(5),trad varchar(20),classify varchar(6),city_id int(6),exchange varchar(6),town_id int(5),town varchar(20),ex_he varchar(20),my_ex varchar(50),photo int(2),ip int(12),time int(10)) ;
Query OK, 0 rows affected (0.02 sec)mysql> insert into publish (number,user,name,phone,title,content,list,things,quality,glance,trad,classify,city_id,exchange,town_id,town,ex_he,my_ex,photo,ip,time) values (1,'2','3',4,'5','6',7,'8','9',10,'11','12',13,'14',15,'16','17','18',19,20,21);
Query OK, 1 row affected (0.01 sec) mysql> select * from publish;
+--------+------+------+-------+-------+---------+------+--------+---------+--------+------+----------+---------+----------+---------+------+-------+-------+-------+------+------+
| number | user | name | phone | title | content | list | things | quality | glance | trad | classify | city_id | exchange | town_id | town | ex_he | my_ex | photo | ip | time |
+--------+------+------+-------+-------+---------+------+--------+---------+--------+------+----------+---------+----------+---------+------+-------+-------+-------+------+------+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
+--------+------+------+-------+-------+---------+------+--------+---------+--------+------+----------+---------+----------+---------+------+-------+-------+-------+------+------+
1 row in set (0.00 sec) 参考技术A 报什么错误?
以上是关于mysql插入数据不成功,核对字段及类型了,无误,怎么回事? id为AUTO_INCREMENT的主要内容,如果未能解决你的问题,请参考以下文章
核对下载好的ROM包MD5校验码,确认ROM正确无误请问刷机怎么核对这个md5?
在mysql中怎么插入一个time类型的数据,数据库字段的数据类型是time,我后台要插入数据 String sql="insert