0% found this document useful (0 votes)
349 views

Practice 3 Part One

sql practice

Uploaded by

shyam15287
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
349 views

Practice 3 Part One

sql practice

Uploaded by

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

Introduction to Oracle9i: SQL 3-24

3-24 Copyright Oracle Corporation, 2001. All rights reserved.


Practice 3 Part One Overview
This practice covers the following topics:
Writing a query that displays the current date
Creating queries that require the use of numeric,
character, and date functions
Performing calculations of years and months of
service for an employee
Practice 3 Part One
This practice is designed to give you a variety of exercises using different functions available for
character, number, and date data types.
Complete practice exercises 1 - 5.
Introduction to Oracle9i: SQL 3-59
Practice 3 - Part One
1. Write a query to display the current date. Label the column Date.
2. For each employee, display the employee number, last_name, salary, and salary increased by 15%
and expressed as a whole number. Label the column New Salary. Place your SQL statement in a
text file named lab3_2.sql.
3. Run your query in the file lab3_2.sql.
4. Modify your query lab3_2.sql to add a column that will subtract the old salary from
the new salary. Label the column Increase. Save the contents of the file as lab3_4.sql.
Run the revised query.
Introduction to Oracle9i: SQL 3-60
Practice 3 - Part One (continued)
5. Write a query that will display the employees last names with the first letter capitalized and all
other letters lowercase and the length of their name, for all employees whose name starts with J,
A, or M. Give each column an appropriate label. Sort the results by the employees last names.

You might also like