MySQL CRUD Tasks
MySQL CRUD Tasks
Part A: Create
Question 5:
Add a new record to the `patients` table with the following details:
- Name: Zainab Farooq
- Age: 32
- Gender: Female
- Disease: COVID-19
- Admission Date: 2025-01-22
Part B: Read
Question 6:
Write queries to:
1. Retrieve all records from the `patients` table.
2. Retrieve the names and diseases of all female patients.
3. Find the patient admitted on `2025-01-10`.
Part C: Update
Question 7:
Write a query to update the `disease` of the patient named "Ahmed Ali" to "Pneumonia."
Part D: Delete
Question 8:
Write a query to delete the record of the patient with the `id` = 4.
Part A: Create
Question 5:
Add a new student record to the `students` table with the following details:
- Name: Zainab Khan
- Age: 15
- Class: 10th
- Grade: B
- Admission Date: 2025-01-22
Part B: Read
Question 6:
Write queries to:
1. Retrieve all records from the `students` table.
2. Retrieve the names and grades of all students in the 10th class.
3. Find the student admitted on `2024-09-25`.
Part C: Update
Question 7:
Write a query to update the `grade` of the student named "Sara Ahmed" to "A."
Part D: Delete
Question 8:
Write a query to delete the record of the student with the `id` = 4.