sqlite3没有刷新表

时间:2015-09-04 23:14:33

标签: python sqlite

conn = sqlite3.connect('./mydb.db')
c = conn.cursor()
with open('./mydb_tmp.sql', 'w') as f:
    for row in c.execute('SELECT * FROM FLOWS'):
        print >>f, row
c.execute('DELETE FROM FLOWS;')
conn.close()

之后,所有行仍然在mydb

1 个答案:

答案 0 :(得分:3)

您需要提交命令。

    fn give<S>(&self, x: S) -> S 
    where S: Limit

查看文档:{​​{3}}