Test 1
Test 1
EmployeePosition Table:
a. Write a query to fetch the EmpFname from the EmployeeInfo table in the upper
case and use the ALIAS name as EmpName.
b. Write a query to fetch the number of employees working in the department
‘HR’.
c. Write a query to get the current date.
d. Write a query to retrieve the first four characters of EmpLname from the
EmployeeInfo table.
e. Write a query to fetch only the place name(string before brackets) from the
Address column of EmployeeInfo table.
f. Write a query to create a new table that consists of data and structure copied
from the other table.
g. Write q query to find all the employees whose salary is between 50000 to 100000.
h. Write a query to find the names of employees that begin with ‘S’
i. Write a query to fetch all the records from the EmployeeInfo table ordered by
EmpLname in descending order and Department in the ascending order.
j. Write a query to fetch details of employees whose EmpLname ends with an
alphabet ‘A’ and contains five alphabets.
k. Write a query to fetch details of all employees excluding the employees with first
names, “Sanjay” and “Sonia” from the EmployeeInfo table.
l. Write a query to fetch details of employees with the address as “DELHI(DEL)”.
m. Write a query to display the first and the last record from the EmployeeInfo
table.