【发布时间】:2020-06-28 00:59:57
【问题描述】:
这里是代码
def __init__(self):
self._db = sqlite3.connect("Reservation.db")
self._db.row_factory = sqlite3.Row
self._db.execute("create table if not exists Ticket(ID integer primary key autoincrement, Name text, Gender text, Order text)")#create a table called Ticket with 4 columns
self._db.commit()
问题
self._db.execute("如果不存在则创建表 Ticket(ID 整数主键自增,名称文本,性别文本,订单文本)") sqlite3.OperationalError:靠近“订单”:语法错误
【问题讨论】:
标签: python-3.x sqlite