我无法访问数据库中的表之一。我什至无法独自删除该表,因此我不确定该怎么做。这是错误:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match' at line 1
因此,每次我对该表进行操作(描述,选择,删除等)时,都会出现此错误。
我已经从代码中删除了该模型,但是并没有从数据库中删除该表。
This is a bit of speculation. But the error is referring to
match
. It might not be obvious, butmatch
is a reserved word in MySQL. It is used for full-text searches.If you have a column or table named
match
and it is being referred to without escape characters (backticks), then you would likely get an error like this.要做的是固定表/列的名称,以使其与保留字不冲突。