直接写 cur . execute ( "INSERT INTO table_name VALUES (value1, value2);" ) 报的错no such column 这样写就好了: import sqlite3 conn = sqlite3 . connect ( 'test.db' ) cur = conn . cursor () cur . execute ( "INSERT INTO table_name
直接写
cur.execute("INSERT INTO table_name VALUES (value1, value2);")报的错no such column
这样写就好了:
import sqlite3conn = sqlite3.connect('test.db')
cur = conn.cursor()
cur.execute("INSERT INTO table_name VALUES (?, ?)", [value1,value2])