0% found this document useful (0 votes)
45 views16 pages

PLSQL, Triggers, Cursors

The document discusses various PL/SQL programs including procedures, functions, triggers and cursors. It provides examples of incrementing a variable using a loop, checking if a number is a palindrome, finding the factorial or a number, generating prime numbers, finding the cube of a number, finding the greatest of two numbers, finding the largest of three numbers, evaluating math operations on numbers, checking if a number is an Armstrong number, reversing a number, triggers for before/after insert/delete/update, inserting using triggers, and using a cursor to retrieve employee details.

Uploaded by

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

PLSQL, Triggers, Cursors

The document discusses various PL/SQL programs including procedures, functions, triggers and cursors. It provides examples of incrementing a variable using a loop, checking if a number is a palindrome, finding the factorial or a number, generating prime numbers, finding the cube of a number, finding the greatest of two numbers, finding the largest of three numbers, evaluating math operations on numbers, checking if a number is an Armstrong number, reversing a number, triggers for before/after insert/delete/update, inserting using triggers, and using a cursor to retrieve employee details.

Uploaded by

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

PL/SQL –PROGRAMS -@LIVE SQL – Dt: 03-11-2020

1) PL/SQL -Procedure to increment the variable by 2 using for loop .


2) PL/SQL to check the given number is palindrome or not
3) PL/SQL Find factorial of a given number

4) PL/SQL – To generate prime numbers up to 100


Output:

5) Find the cube of a number using Stored function


6) Find the greatest among 2 numbers using stored procedure

7) PL/SQL- Find the Largest of 3 Numbers


8) PL/SQL – Procedure to Evaluate SUM,DIFFERENCE,MULTIPLICATION and
DIVISION

9) PL/SQL to check the given number is Armstrong Number or not.


10) PL/SQL To Reverse a Number
TRIGGERS
BEFORE INSERT
Trigger – BEFORE DELETE
TRIGGER –AFTER UPDATE

TRIGGERS - INSERTION
CURSORS
Write a CURSOR Program to retrieve the Details of all the Employees
using CURSORS.

Create A Table of Employee with Attributes- Eid,Ename, Job,Sal


OUTPUT:

You might also like