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

PL-SQL Lab Assignment 2

The document outlines a PL/SQL lab assignment involving exceptions, deleting records, cursors, %TYPE and %ROWTYPE attributes, and passing parameters to cursors. The assignment involves writing PL/SQL code to demonstrate exceptions, check for deleted records, count deleted records, display employee details using %TYPE and %ROWTYPE, display employees of a department using a cursor, display the top 5 highest paid employees using a cursor, and calculate the total salary of the first N records passed as a cursor parameter.

Uploaded by

Kartik Chopra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

PL-SQL Lab Assignment 2

The document outlines a PL/SQL lab assignment involving exceptions, deleting records, cursors, %TYPE and %ROWTYPE attributes, and passing parameters to cursors. The assignment involves writing PL/SQL code to demonstrate exceptions, check for deleted records, count deleted records, display employee details using %TYPE and %ROWTYPE, display employees of a department using a cursor, display the top 5 highest paid employees using a cursor, and calculate the total salary of the first N records passed as a cursor parameter.

Uploaded by

Kartik Chopra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

PL/SQL Lab Assignment-2

1. Write a PL/SQL program to demonstrate following exceptions:


• Too Many Rows
• No Data Found
2. Write a PL/SQL code to display a message to check whether the record is deleted or not.
3. Write a PL/SQL code to display a message to provide the information about the number of records
deleted by the delete statement issued in a PL/SQL block.
Cursor
EMP (empno, ename, job, sal, deptno)
4. Write a PL/SQL code to demonstrate %TYPE and %ROWTYPE to display details of employees
in EMP table.
5. Write a PL/SQL code to display the empno, ename, job of employees of department
number 10 for EMP table (using Cursor).
6. Write a PL/SQL code to display the employee number and name of top 5 highest paid
Employees (using Cursor).
7. Write a PL/SQL code to calculate the total salary of first n records of emp table. The value of n is
passed to cursor as parameter

You might also like