如何在Python 2.7 MySQLdb中使用MYSQL索引
indie = '''CREATE FULLTEXT yay ON panda (Question, Answer);'''
cursor.execute(indie)
我已经成功连接到服务器、数据库和表格,一切都正常,但不知道为什么它就是不在表格panda的Question和Answer这两列上创建yay索引。出现了这个错误:
_mysql_exceptions.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 'yay ON panda (Question, Answer)' at line 1")
我尝试了很多修复的方法,但就是搞不懂。有没有人能帮帮我?
1 个回答
1