mirror of
https://github.com/rasbt/python_reference.git
synced 2025-03-01 11:28:44 +00:00
Update create_db.py
This commit is contained in:
parent
685bcd9e9a
commit
3139a22f38
@ -9,7 +9,7 @@ c = conn.cursor()
|
|||||||
|
|
||||||
# create table
|
# create table
|
||||||
c.execute('''CREATE TABLE zinc_db1
|
c.execute('''CREATE TABLE zinc_db1
|
||||||
(zinc_id TEXT, purchasable TEXT, non_rot_bonds INT)''')
|
(zinc_id PRIMARY KEY, purchasable TEXT, non_rot_bonds INT)''')
|
||||||
|
|
||||||
# Insert one row of data
|
# Insert one row of data
|
||||||
c.execute("INSERT INTO zinc_db1 VALUES ('ZINC00895032','YES', 4)")
|
c.execute("INSERT INTO zinc_db1 VALUES ('ZINC00895032','YES', 4)")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user