Skip to content

Instantly share code, notes, and snippets.

@NielsMinssen
Created August 11, 2022 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NielsMinssen/8c2483f74a4e468603205bbd151ab424 to your computer and use it in GitHub Desktop.
Save NielsMinssen/8c2483f74a4e468603205bbd151ab424 to your computer and use it in GitHub Desktop.
cur = conn.cursor() # creation du curseur, basé sur la variable conn qui contient la connexion à la bdd
# executer une requête qui créer la table
cur.execute("""
CREATE TABLE Employee
(
ID INT PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL,
EMAIL TEXT NOT NULL
)
""")
# valider les modifications
conn.commit()
print("Table créée avec succès")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment