Solution:
There are a lot of users who use MySQL may encounter this problem, obviously the table in this column exists, why in the query when said that the column name can not be found?
The reason I came across is that the column names are preceded by spaces:
Create TableStudents (SIDint, _mathdecimal(9,2), 中文版varchar(3) );Insert intoStudentsValues(1, -,' -'),(2, -,' -'),(3, the,' the'),(4,NULL,' the'),(5, the,NULL),(6,NULL,NULL); MySQL> Select * fromstudents;+---------+-----------+-------------+|Sid|_math|中文版|+---------+-----------+-------------+| 1 | 50.00 | - || 2 | 70.00 | - || 3 | 80.00 | the || 4 | NULL | the || 5 | 80.00 | NULL || 6 | NULL | NULL |+---------+-----------+-------------+Select *not easy to see the problem, we use show create to see:|Students| CREATE TABLE' Students ' (' Sid ' )int( One)DEFAULT NULL, ' _math 'decimal(9,2)DEFAULT NULL, ' 中文版 'varchar(3)DEFAULT NULL) ENGINE=InnoDBDEFAULTCHARSET=Utf8|There are many more spaces in front of each column name. Solution, remove table rebuild:Drop Tablestudents; cause of error:1, it is possible that the code you created the table is copy online. For example, the one I entered above creates a table with a statement that will cause problems. 2, your editor is recognized as a Chinese space. It is generally not possible to enter this issue in Notepad.
mysql5.x Manual http://doc.mysql.cn/
MySQL official website http://dev.mysql.com/
Mysql5.7 Reference Manual http://dev.mysql.com/doc/refman/5.7/en/
Other reference Manuals
Csdn-mysql Knowledge Base
Author:liuning
MYSQL Unknown Column Solution