0% found this document useful (0 votes)
3 views1 page

SQL Lab: Students Table Operations

The document outlines a SQL lab exercise involving a 'Students' table with columns for student_id, name, age, course, marks, and city. It includes tasks such as creating the table, inserting records, displaying data, filtering students based on criteria, and performing various SQL operations like counting, updating, and deleting records. The lab aims to practice SQL commands and data manipulation techniques.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

SQL Lab: Students Table Operations

The document outlines a SQL lab exercise involving a 'Students' table with columns for student_id, name, age, course, marks, and city. It includes tasks such as creating the table, inserting records, displaying data, filtering students based on criteria, and performing various SQL operations like counting, updating, and deleting records. The lab aims to practice SQL commands and data manipulation techniques.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like