1.
Consider the following table STUDENT:
RollNo Name Class Marks
101 Anjali 12 87
102 Mohit 12 76
103 Priya 11 90
104 Sameer 12 65
105 Kavita 11 80
Write SQL commands to do the following:
a. Display the names of all students of class 12.
b. Display all records sorted by Marks in descending order.
c. Count the number of students in class 11.
d. Update the Marks of Sameer to 70.
e. Delete the record of student with RollNo 105.
2. Write SQL commands for the following queries on a
table EMPLOYEE(EID, Name, Dept, Salary):
a. Create the table with appropriate data types.
b. Insert any 2 rows into the table.
c. Display details of employees whose salary is greater than 50,000.
d. Display all employees in the 'HR' department.
e. Increase the salary of all employees in ‘IT’ department by 10%.
3. Consider the following SQL table BOOKS(BookID, Title, Author,
Price, Publisher). Write SQL queries for the following:
a. Display the titles of books published by 'Oxford'.
b. List books where price is between 200 and 500.
c. Count the number of books by each publisher.
d. Show all books by 'Chetan Bhagat'.
e. Delete all books with price less than 100.