SQL_Questions_Class11
SQL_Questions_Class11
1. Write an SQL query to create a table named Employee with the following columns:
|--------|----------|-------------|---------|
5. Write an SQL query to display all records from the Employee table.
6. Write an SQL query to display only the Name and Salary columns from the Employee table.
7. Retrieve all employees from the Employee table whose Salary is greater than 30,000.
8. Write an SQL query to fetch all products from the Products table where the Category is
'Electronics'.
9. Write an SQL query to display all records from the Employee table in descending order of Salary.
10. Display all records from the Products table sorted by Product_Name in ascending order.
11. Write an SQL query to find the average Salary of employees in the Employee table.
12. Calculate the total number of products in the Products table using an SQL query.
13. Write an SQL query to group employees by Designation and find the average Salary for each
designation.
14. Modify the above query to display only those designations where the average Salary is greater
than 35,000.
15. Write an SQL query to increase the Salary of all employees in the Employee table by 10%.
16. Update the Price of all products in the Products table where Category is 'Electronics', increasing
17. Write an SQL query to delete all employees from the Employee table where the Salary is less
than 30,000.
18. Delete the record from the Products table where the Product_ID is 1.
19. Write an SQL query to add a new column Email (VARCHAR, length 50) to the Employee table.
20. Write an SQL query to drop the Category column from the Products table.