You are on page 1of 3

P.N.N.

COLLEGE : NIDUBROLU
III B.SC COMPUTERS ORACLE PRACTICAL RECORD WORK
Submit dates:
Branch Observation Record
ME&MS computers 10-12-10 16-12-10
MP Computers 09-12-10 15-11-10
Pl/Sql 08-01-11 18-1-11

Note : After schedule date records or observations are not accepted

1. Aim : To create tables using various constraints

1. Table name : client master


Columnname data type size constraint
Clientno varchar2 6 primary key, first letter should be ‘C’
Name varchar2 15 not null
City varchar2 10
State varchar2 15
Pincode number 8
Balance number(10,2)
2. Table name : sales master
Columnname data type size constraint
Salesmanno varchar2 6 primary key, first letter must be ‘S’
Name varchar2 15 not null
City varchar2 10 not null
Pincode number 8
State varchar2 15
Salesamt number (8,2) not null can’t be zero
Target number (6,2) not null
3. Table name : sales order
Columnname data type size constraint
Orderno varchar2 6 primary key, must start with ‘O’
Orderdate date
Clientno varchar2 6 foreign key, references client no of client master tables
Delyadd varchar2 25
Salaesmanno varchar2 6 foreign key references salesman no of sales master table
Delytype char 1 part P, full F default F
4. Table name : sales details
Columnname data type size constraint
Orderno varchar2 6 foreign key references order no of sales order table
Productno varchar2 6 foreign key referencing product no & product mater table
Qtyonhand number 3
Qtydisp number 3
Productrate number 10,2
2. Aim : To insert values into the created tables
1. To insert values into ‘sales master’ table
2. To insert values into the ‘client master’ table
3. To insert values into ‘sales order’ table
4. To insert values into the ‘sales details” table
3. Aim : Retrieving data from the tables (show at lest 5 rows)
1. Display the contents of ‘client master table
2. Display the contents of ‘sales master’ table
3. Display the contents of ‘sales order’ table
4. Display the contents of ‘sales details’ table
4. Aim : To desribe the tables with their structure in the data base
1. Describe the ‘client master’ table
2. Describe the department table
3. Describe the emp table
4. Describe the sales master table
5. Describe the sales order table
6. Describe sales details table
5. Aim : Data manipulations from emp,dept tables using the where condition
1. Describe the details of employees who did not get any commission
2. Display the details of employees whose salary>1000
3. Display the employee details who has no manger
4. Display the employees who have exactly 4 letters in their name
5. Display the details whose 2nd letter in their name is ‘I’
6. Display the emp details whose name start with letter A.
7. Display the emp details whose job is analyst
8. Display the details of President
9. Display the list of various department numbers
10. Display the various locations from department table
11. List the department names from department table
12. Display the details of employee whose deptno is 30
6. Aim : Data manipulations using between, not between, in, not in, and or clauses
1. Display the details of employee whose salary in between 1500 and 200
2. Display the employees whose names are b/w A to J
3. Display the employee whose names are not b/w a to J
4. List the employee whose name starts with A or C
5. Display the empno, ename who belongs to deptno 10 or 20
6. Give the empno,ename who are either manager or analyst
7. Display the employee details are whose name starts with ‘A’ and whose job is manager
8. Display the employees who are not neither manger or president or analyst
9. Display the employees whose names starts with A and belongs to deptno 30
10. Display the employee details whose name starts with A and whose job is manager
11. Display the emp details whose comm. Is null and belonging to deptno 20
7. Aim : Data manipulations using order by, aggregate function
1. Display the empno and names in ascending order
2. Display the empno,ename,salary in descending order
3. Display the names of departments in descending order
4. Display the total salary and rename as “total salary” of all employees
5. Display the average salary of emp table
6. Display the no of employees working of emp table
7. Display the different jobs from emp table
8. Display the total types of jobs from emp
9. Display different jobs along with the total employees working
10. Display different department numbers and total sales of each department
11. Display the employees jobs and their job wise total salaries
12. Display no of employees whose name starts with A
8. Aim : Data manipulations using ‘date functions’
1. Display today’s date
2. Display today’s date in ‘dd-month-yyyy’ format
3. What is the day today
4. What is the day of today in next year
5. Display the emp names along with their data & joining in day (dd/month/yyyy) format
6. What is the day to this date after 4 months
7. Display the details of employees who have joined between 81 and 82
8. Display the details of employees who have joined after the year 83.
9. Display the date after 15 days
10. Display the empno,name,job and years of experience
9. Aim : Data manipulations using ‘having clause , math functions
1. Display the employee names and sqrt of their salary
2. Display the rounded value of 9.876 up to 2 decimal points
3. Display the employee name, sqrt of sal advised to next integer
4. Display the ceil value of 9.876
5. Display the floor value of 9.876
6. Display total salary of each dept along with deptno whose deptno>10
7. Display the average salary of employee dept wise whose deptno<30
8. Display the total salaries of employees except president
9. Display sum, avg, salaries dept wise having avg(sal)>sum(sal)
10. Aim : Data manipulations using various string functions
Display employee names and their length
Display the empno,name,job,deptno with left padding using ‘*’ rename the column name
Display the empno,name,job,deptno with right padding using ‘~’ rename the column name
Display the emp names and job in lower case
Display the dept table with the names having only the first letter as capital letter
Display the only five characters of the deptname
11. Aim : to display the data using joins, sub queries
Display the empno,ename,sal,job,dname,loc of all employees
Display the names of employees along with their managers
Display the details of employees whose salary is greater than avg salary
Display the details of employees who are earning less than their managers
Display the details of employees whose deptno is > 20 and earns more than the lowest salary.
Display the details of employees who earn the lowest salary in each department.
Display the details of employees who earn the highest salary in each department
Display the details of employees who have atleast one person reporting to them.
12.Aim : create a report to display the details of employees with their departments and
total salary of each department using sql*plus commands
Output
COMPANY REPORT

DEPARTMENT JOB SALARY ENAME

10 MANAGER 2450 CLARK


PRESIDENT 5000 KING
CLERK 1300 MILLER
** SUM ** 8750

Pl/sql programs
Write a pl/sql program to perform arithmetic operations on two numbers
Write a pl/sql program to find the biggest of two numbers using if-else
Write a pl/sql program to print ‘n’ natural numbers
Write apl/sql program to print even numbers between 1 and n.
Write a pl/sql program to print 10 numbers using for loop.
Write a pl/sql program to print reverse of 10 natural numbers
Write a pl/sql program to print the multiplication table for a given number
Write a pl/sql program for to find biggest of 3 numbers
Write a pl/sql program to find the reverse of the given number.

You might also like