-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql.py
More file actions
24 lines (19 loc) · 659 Bytes
/
Copy pathsql.py
File metadata and controls
24 lines (19 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import sqlite3
connection = sqlite3.connect("student.db")
cursor = connection.cursor()
cursor.execute("""
CREATE TABLE STUDENT(
NAME VARCHAR(25),
CLASS VARCHAR(25),
SECTION VARCHAR(25),
MARKS INT
)
""")
cursor.execute("INSERT INTO STUDENT VALUES('Ashutosh','Gen ai','A',90)")
cursor.execute("INSERT INTO STUDENT VALUES('Anupam','DGen ai','B',100)")
cursor.execute("INSERT INTO STUDENT VALUES('Evanjilin','powebi','A',86)")
cursor.execute("INSERT INTO STUDENT VALUES('Nidhi','webDEVOPers','A',50)")
cursor.execute("INSERT INTO STUDENT VALUES('Parshvi','powebi','A',35)")
connection.commit()
connection.close()
print("Student DB Created!")