
http://docs.python.org/library/sqlite3.html#cursor-objects
Python的SQLite库没有准备好的语句对象,但是它们允许您使用参数化查询并提供多组参数。
编辑:根据
executemany要求的示例:
values_to_insert = [(1,"foo"), (2, "bar"), (3, "baz")]cursor.executemany(""" INSERT INTO some_table ('item_num', 'item_name') VALUES (?, ?)""", values_to_insert)欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)