import sqlite3
# Connecting to sqlite
# connection object
connection_obj = sqlite3.connect('VVFGC.db')
# cursor object
cursor_obj = connection_obj.cursor()
# Drop the table if already exists.
cursor_obj.execute("DROP TABLE IF EXISTS BCA")
# Creating table
table = """ CREATE TABLE BCA (
Email VARCHAR(255) NOT NULL,
First_Name CHAR(25) NOT NULL,
Last_Name CHAR(25),
Score INT
); """
cursor_obj.execute(table)
print("Table is Ready")
# Close the connection
connection_obj.close()
No comments:
Post a Comment