python实现在sqlite动态创建表的方法
时间:2021-06-20 08:50:51|栏目:Python代码|点击: 次
本文实例讲述了python实现在sqlite动态创建表的方法。分享给大家供大家参考。具体实现方法如下:
import sqlite3 as db
conn = db.connect('mytest.db')
cursor = conn.cursor()
cursor.execute("create table person(name text,age text,address text)")
print("table created")
希望本文所述对大家的Python程序设计有所帮助。
上一篇:Python如何应用cx_Oracle获取oracle中的clob字段问题
栏 目:Python代码
下一篇:Python实现调用另一个路径下py文件中的函数方法总结
本文地址:http://www.codeinn.net/misctech/145320.html






