SQL LAB – 2
Table: Students
student_id name age course marks city
1 Aman 20 BCA 78 Delhi
2 Riya 22 MCA 85 Mumbai
3 Naman 21 BCA 90 Indore
4 Simran 23 MBA 60 Delhi
5 Karan 20 [Link] 55 Pune
Questions:
1. Create the Students table with the above columns.
2. Insert all 5 records into the table.
3. Display all records from the table.
4. Show only the name and marks of all students.
5. List all students who are from Delhi.
6. Find students with marks greater than 70.
7. Show all students enrolled in BCA.
8. Count the total number of students.
9. Find the highest marks in the table.
10. Calculate the average marks of all students.
11. Display students ordered by marks in descending order.
12. Update the marks of Karan to 65.
13. Delete the record of student named Simran.
14. Display all unique courses from the table.
15. Drop the Students table.