The following articles mainly describe the actual solution to conflicts between MySQL field names and reserved words. We all know that conflicts between MySQL field names and reserved words often occur in actual operations, therefore, the corresponding solutions have attracted much attention.
I just found that two fields in my original database table use the reserved word add and comment ). An error occurred during insert and update. I remember that SQL server seems to be surrounded. So I tried it and it turns out that it won't work in MySQL. After a simple search on the Internet, we found that brackets were used.
Later, I thought that the SQL statement generated by MySQL Administrator would enclose all the table names in single quotes. After trying it out, it still won't work. But the generated symbol can be copied. Make sure that the symbol is not a single quotation mark. At first glance, the marker is on the key before Number 1 ). Solve this problem. The following is a summary:
In MySQL, when the table name, field name, or Database Name Conflict with the reserved word, you can use an underscore (') in an SQL statement.
The above content is an introduction to the solutions to conflicts between the MySQL field names and reserved words. I hope you will find some gains.