我将pymysql与python 3.7.3和MySQL 8.0一起使用。
我尝试删除一行:
sql_delete = "DELETE FROM %s WHERE new_id=%s"
self.cursor.execute(sql_delete , [table_name, this_id])
我得到一个错误:
pymysql.err.ProgrammingError: (1064, "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 ''the_table' WHERE new_id=3' at line 1")
这是怎么了?