Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (1 vote)
237 views

SQL Lab 2 Exercises

The document contains 10 SQL query exercises focusing on functions related to date/time and retrieving specific rows from tables. The queries include filtering for employees joined in February 2014, showing odd numbered rows, calculating a 20% salary increment, counting hires on a specific date, finding employees with first names over 8 characters, modifying employee IDs and emails, finding uppercase first names, subtracting a time interval from a date, converting a character string to a date, and filtering last names starting with L.

Uploaded by

Neha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
237 views

SQL Lab 2 Exercises

The document contains 10 SQL query exercises focusing on functions related to date/time and retrieving specific rows from tables. The queries include filtering for employees joined in February 2014, showing odd numbered rows, calculating a 20% salary increment, counting hires on a specific date, finding employees with first names over 8 characters, modifying employee IDs and emails, finding uppercase first names, subtracting a time interval from a date, converting a character string to a date, and filtering last names starting with L.

Uploaded by

Neha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

LAB-2 EXERCISES

Functions and Date Time

1. Write An SQL Query To Print Details Of The Workers Who Have Joined In Feb’2014.
2. Write An SQL Query To Show Only Odd Rows From A Table.
3. List the employees whose salary is more than 3000 after giving 20% increment.
4. Write a SQL statement that counts all employees hiring on date August 17th, 2012.
5. Write a query to find the details of those employees who contain eight or more characters
in their first name.
6. Write a query to get the employee id, email id to discard the last three characters.
7. Write a query to find all the employees which first name contains the entire uppercase
letter.
8. Write a query which returns a date after which a certain time/date interval has been
subtracted.
9. Convert a date which is in the character string to a date value.
10. Write a query which returns employees whose last names begin with the letter L, whose
ASCII equivalent is 76:

You might also like