這篇文章主要介紹了python實(shí)現(xiàn)在sqlite動(dòng)態(tài)創(chuàng)建表的方法,涉及Python操作SQLite數(shù)據(jù)庫(kù)創(chuàng)建數(shù)據(jù)表的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下
本文實(shí)例講述了python實(shí)現(xiàn)在sqlite動(dòng)態(tài)創(chuàng)建表的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:
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")
希望本文所述對(duì)大家的Python程序設(shè)計(jì)有所幫助。
更多信息請(qǐng)查看IT技術(shù)專欄