|
import sqlite3
|
|
|
|
|
|
connection=sqlite3.connect("STUDENT.db")
|
|
|
|
|
|
cursor=connection.cursor()
|
|
|
|
|
|
table_info="""
|
|
create table STUDENT(NAME VARCHAR(25),CLASS VARCHAR(25),
|
|
SECTION VARCHAR(25),MARKS INT)
|
|
"""
|
|
|
|
cursor.execute(table_info)
|
|
|
|
|
|
cursor.execute('''Insert Into STUDENT values('Jainam','Data Science','A',90)''')
|
|
cursor.execute('''Insert Into STUDENT values('Jackie','Data Science','B',100)''')
|
|
cursor.execute('''Insert Into STUDENT values('Gadot','Data Science','A',86)''')
|
|
cursor.execute('''Insert Into STUDENT values('Jacob','DEVOPS','A',50)''')
|
|
cursor.execute('''Insert Into STUDENT values('Dikshita','DEVOPS','A',35)''')
|
|
|
|
|
|
print("The inserted records are")
|
|
data=cursor.execute('''Select * from STUDENT''')
|
|
for row in data:
|
|
print(row)
|
|
|
|
|
|
connection.commit()
|
|
connection.close()
|
|
|