9th day of python challenges 124-145

This commit is contained in:
abd.shallal
2019-08-05 16:33:21 +03:00
parent 5349baf68b
commit 81d4fd37bf
4 changed files with 101 additions and 204 deletions

View 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()