How to handle mysql keywords as field names

Today, I encountered a matter of using the range keyword as the field name of the mysql table. Generally speaking, do not do such a thing. The
solution is as follows:

add



update xx set `range` =

to the left and right of the


field, oracle use the keyword as the field, the solution field Add double quotation marks around

UPDATE k SET "UID"=5

When others operate this table, if they don't notice that the field name is a keyword, they will toss for a long time. So it is not recommended.

Phenomenon and solution:
If there is an error in an unknown situation, put the sql in navicat and find that one of the fields read is highlighted, and the keyword can be determined

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326190206&siteId=291194637