0% found this document useful (0 votes)
5 views18 pages

Database Assignment 4

The document contains a series of database assignment questions focused on SQL queries related to employee data. Each question requires a specific query to manipulate or retrieve employee information, such as names, hire dates, salaries, and contact details. The document outlines 18 distinct queries, each with a placeholder for the solution.
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)
5 views18 pages

Database Assignment 4

The document contains a series of database assignment questions focused on SQL queries related to employee data. Each question requires a specific query to manipulate or retrieve employee information, such as names, hire dates, salaries, and contact details. The document outlines 18 distinct queries, each with a placeholder for the solution.
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/ 18

DATABASE ASSIGNMENT-4

Q1. Write a query to display employee names in uppercase.

SOL:
Q2. Write a query to get the year for each employee was hired.

SOL:
Q3. Write a query to display salaries with a comma separator (e.g., 88,000.00 instead of
88000.00).

SOL:
Q4. Write a query to mask employee email addresses, showing only the domain.

SOL:
Q5. Write a query to display only the last four digits of employees' phone numbers.

SOL:
Q6. Write a query to display the length of each employee's full name.

SOL:
Q7. Write a query to find employees hired before the year 1989.

SOL:
Q8. Write a query to round employee salaries to the nearest thousand.

SOL:
Q9. Write a query to display the hire date in ‘Monday, June 23, 2015’ format.

SOL:
Q10. Write a query to update the portion of the phone_number in the employees table,
within the phone number the substring '124' will be replaced by '999'.

SOL:
Q11.Write a query to get the details of the employees where the length of the first name

greater than or equal to 8.

SOL:
Q12. Write a query to display leading zeros before maximum and minimum salary.

SOL:
Q13. Write a query to append '@example.com' to email field.

SOL:
Q14. Write a query to get the employee id, first name and hire month

SOL:

.
Q15. Write a query to get the employee id, email id (discard the last three characters).

SOL:
Q16. Write a query to find all employees where first names are in upper case.

SOL:
Q17. Write a query to extract the last 4 character of phone numbers.

SOL:
Q18. Write a query to get the last word of the street address.

SOL:

You might also like