9th day of python challenges 124-145
This commit is contained in:
12
challenges139-145/challenge-139.py
Normal file
12
challenges139-145/challenge-139.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import sqlite3
|
||||
|
||||
with sqlite3.connect('python-by-example') as db:
|
||||
cursor = db.cursor()
|
||||
cursor.execute("""CREATE TABLE IF NOT EXISTS employees(
|
||||
id integer PRIMARY KEY,
|
||||
name text NOT NULL,
|
||||
dept text NOT NULL,
|
||||
salary integer);""")
|
||||
cursor.execute("""INSERT INTO employees(id,name,dept,salary)
|
||||
VALUES("1","Bob","Sales","25000")""")
|
||||
db.commit()
|
Reference in New Issue
Block a user