Spaces:
Sleeping
Sleeping
Update sqlite.py
Browse files
sqlite.py
CHANGED
|
@@ -9,7 +9,7 @@ cursor=connection.cursor()
|
|
| 9 |
|
| 10 |
## create the table
|
| 11 |
table_info="""
|
| 12 |
-
Create table
|
| 13 |
SECTION VARCHAR(25),MARKS INT);
|
| 14 |
|
| 15 |
"""
|
|
@@ -17,16 +17,16 @@ cursor.execute(table_info)
|
|
| 17 |
|
| 18 |
## Insert Some more records
|
| 19 |
|
| 20 |
-
cursor.execute('''Insert Into
|
| 21 |
-
cursor.execute('''Insert Into
|
| 22 |
-
cursor.execute('''Insert Into
|
| 23 |
-
cursor.execute('''Insert Into
|
| 24 |
-
cursor.execute('''Insert Into
|
| 25 |
|
| 26 |
## Disspaly ALl the records
|
| 27 |
|
| 28 |
print("The isnerted records are")
|
| 29 |
-
data=cursor.execute('''Select * from
|
| 30 |
for row in data:
|
| 31 |
print(row)
|
| 32 |
|
|
|
|
| 9 |
|
| 10 |
## create the table
|
| 11 |
table_info="""
|
| 12 |
+
Create table STUDENT (NAME VARCHAR(25),CLASS VARCHAR(25),
|
| 13 |
SECTION VARCHAR(25),MARKS INT);
|
| 14 |
|
| 15 |
"""
|
|
|
|
| 17 |
|
| 18 |
## Insert Some more records
|
| 19 |
|
| 20 |
+
cursor.execute('''Insert Into STUDENT values('Sourav','Data Science','A',90)''')
|
| 21 |
+
cursor.execute('''Insert Into STUDENT values('Sushant','Data Science','B',100)''')
|
| 22 |
+
cursor.execute('''Insert Into STUDENT values('Axay','Data Science','A',86)''')
|
| 23 |
+
cursor.execute('''Insert Into STUDENT values('Rakesh','DEVOPS','A',50)''')
|
| 24 |
+
cursor.execute('''Insert Into STUDENT values('Subham','DEVOPS','A',35)''')
|
| 25 |
|
| 26 |
## Disspaly ALl the records
|
| 27 |
|
| 28 |
print("The isnerted records are")
|
| 29 |
+
data=cursor.execute('''Select * from STUDENT''')
|
| 30 |
for row in data:
|
| 31 |
print(row)
|
| 32 |
|