mysql中字符串和整型自动转换的问题
表结构如下 desc info; +-------+-----------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------------+------+-----+---------+----------------+ | id | int(8) unsigned | NO | PRI | NULL | auto_increment | | name | varchar(20) | YES | | NULL | | +-------+-----------------+------+-----+---------+----------------+ 2 rows in set (0.00 sec) 执行sql. insert into info values ('', 'xxx'); insert into info values ('', 'yyy'); 查询记录. select * from info; +----+------+ | id | name | +----+------+ | 1 | xxx | | 2 | yyy | +----+------+ 2 rows in set (0.00 sec) 执行下面sql. ...