我对python和sqlite3有疑问.我想从Python中删除一个表.命令
cur.execute('drop table if exists tab1')
Run Code Online (Sandbox Code Playgroud)
不行.
cur.executescript('drop table if exists tab1;')
Run Code Online (Sandbox Code Playgroud)
做的工作.
execute方法允许创建表.但是,它不会掉落吗?是否有一个原因?
| 归档时间: |
|
| 查看次数: |
22067 次 |
| 最近记录: |