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

Practice Queries Questions

The document provides SQL commands for various operations on two tables: STUDENT and EMPLOYEE, including displaying student names, sorting records, counting students, updating records, and deleting entries. It also includes commands for creating an EMPLOYEE table, inserting data, filtering employees by salary and department, and adjusting salaries. Additionally, it outlines queries for a BOOKS table to display titles, filter by price, count books by publisher, show specific authors, and delete books based on price criteria.

Uploaded by

fasiel4332
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Practice Queries Questions

The document provides SQL commands for various operations on two tables: STUDENT and EMPLOYEE, including displaying student names, sorting records, counting students, updating records, and deleting entries. It also includes commands for creating an EMPLOYEE table, inserting data, filtering employees by salary and department, and adjusting salaries. Additionally, it outlines queries for a BOOKS table to display titles, filter by price, count books by publisher, show specific authors, and delete books based on price criteria.

Uploaded by

fasiel4332
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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.

You might also like