Professional Documents
Culture Documents
DB Lab Tasks
DB Lab Tasks
5
SQL: Single Row Functions
OBJECTIVE:
DESCRIPTION:
1. Number Functions
You can manipulate retrieved numbers by rounding up to specific
precessions or perform extra calculation functionalities. SQL has several
number functions that you can use to manipulate retrieved numbers. The
following are list of functions and example of each:
LAB TASK
Sample Data
1. Display ename, salary and concated result of deptno and empno from
table EMP where salary is less than 2500 or job is equal to MANAGER.
2. Display first 3 characters of ename, deptno and job from table EMP where
second character of ename is ‗A‘ and deptno is 30 or job is SALESMAN.
3. Right Append dollar sign to make salary 8 digit value and calculate
remainder of annual salary from monthly salary and rename it as
REMAINDER where ename is KING and salary is greater than 1500 from
table EMP.
4. Round 345.6665 upto 2 digits from table DUAL.
5. Write a query that displays enames with first letter capitalized and all
other letters in lowercase and length of enames whose enames start with J,
A or N.
Execute these queries and analyze the results.
DELIVERABLES:
1. SingleRowQueries.txt.
2. Screenshots of results achieved.