Importance of backtick around table name in MySQL query

后端 未结 3 2080
野的像风
野的像风 2020-12-15 22:43

In MySQL queries, how important is it to put backticks around a table name. Does it have something to do with security? Are MySQL injection attacks possible through the ta

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-15 23:04

    The backticks help you from accidentally using a name that is a reserved word in SQL for example. Take a table named "where", it's a stupid name for a table I agree, but if you wrap it in backticks it will work fine.

提交回复
热议问题