1 Star 0 Fork 0

dbembed/PythonLearn

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
database.py 680 Bytes
Copy Edit Raw Blame History
import sqlite3
name = 'kevin'
school = 'sanzhong'
id_num = 20220314
conn = sqlite3.connect('./test.db')
cursor = conn.cursor()
sql = 'create table students (name text, school text, id int)'
sql_data = ''' insert into students
(name, school, id)
values
('kevin', 'sanzhong', 20220314)'''
#cursor.execute(sql)
cursor.execute("insert into students (name, school, id) values ('kevin', 'sanzhong', 20220314)")
cursor.execute("insert into students (name, school, id) values ('kevin', 'sanzhong', 20220314)")
cursor.execute("insert into students (name, school, id) values ('kevin', 'sanzhong', 20220314)")
conn.commit()
cursor.close()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/dbembed/PythonLearn.git
git@gitee.com:dbembed/PythonLearn.git
dbembed
PythonLearn
PythonLearn
master

Search