import sqlite3
# 可以指定创建数据库的路径,比如可以写成sqlite3.connect(r"E:\DEMO.db")
con = sqlite3.connect("DEMO.db")
cur = con.cursor()
sql = "CREATE TABLE IF NOT EXISTS jobkey(type text(255) PRIMARY KEY,jobkey text(500))"
cur.execute(sql)
con.commit()
import sqlite3
# 可以指定创建数据库的路径,比如可以写成sqlite3.connect(r"E:\DEMO.db")
con = sqlite3.connect("DEMO.db")
cur = con.cursor()
sql = "CREATE TABLE IF NOT EXISTS jobkey(type text(255) PRIMARY KEY,jobkey text(500))"
cur.execute(sql)
con.commit()