SQL Question Bank
SQL Question Bank
QUESTIONS:
1. Write an SQL query to fetch “FIRST_NAME” from the Worker table using the alias name
<WORKER_NAME>
2. Write an SQL query to fetch “FIRST_NAME” from the worker table in upper case.
3. Write an SQL query to etch unique values of DEPARTMENT from the worker table.
4. Write an SQL query to print the first three characters of First_name from the worker table.
5. Write an SQL query to find the position of the alphabet (‘a’) in the first name column
‘Amithab’ from the worker table.
6. Write an SQL query to print the FIRST_NAME from the worker table after removing white
spaces from the right side.
7. Write an SQL query to print the DEPARTMENT from the Worker table after removing white
spaces from the left side.
8. Write an SQL query that fetches the unique values of DEPARTMENT from the Worker table
and prints its length.
9. Write an SQL query to print the FIRST_NAME from the Worker table after replacing ‘a’ with
‘A’.
10. Write an SQL query to print the FIRST_NAME and LAST_NAME from the Worker table into a
single column COMPLETE_NAME. A space character should separate them.
11. Write an SQL query to print all Worker details from the Worker table ordered by
FIRST_NAME in ascending order.
12. Write an SQL query to print all Worker details from the Worker table ordered by
FIRST_NAME in ascending order and DEPARTMENT in descending order.
13. Write an SQL query to print details for Workers with the first names “Vipul” and “Satish”
from the Worker table.
14. Write an SQL query to print details of Workers excluding first names, “Vipul” and “Satish”
from the Worker table.
15. Write an SQL query to print details of Workers with DEPARTMENT name as “Admin”.
16. Write an SQL query to print details of the Workers whose FIRST_NAME contains ‘a’.
17. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘a’.
18. Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘h’ and
contains six alphabets.
19. Write an SQL query to print details of the Workers whose SALARY lies between 100000 and
500000.
20. Write an SQL query to print details of the Workers who joined in Feb 2021.