Assignment-4 python
Assignment-4 python
1. What is MySQL?
a. Explain its purpose, key features, and use cases in
database management.
Program:
4. Read Operation
a. Basic SELECT Query: Write a query to fetch all records
from the students table.
b. Filtering Data: Retrieve all students who are 18 years
or older.
Program:
5. Update Operation
a. Updating Records: Update the city field for students from
city='Mumbai' to city='Delhi'.
b. Conditional Update: Increase the age of all students in
grade 'B' by 1 year.
c. Batch Update: Update the grade of students based on the
following conditions:
d. Set grade='A' for students with age > 20.
e. Set grade='B' for students with age <= 20.
6. Delete Operation
a. Deleting Specific Rows: Delete all students whose age is
below 20.
b. Deleting All Rows: Write a query to delete all rows from
the students table but keep the table structure intact.
Program:
(a).
(b).