0% found this document useful (0 votes)
27 views2 pages

Dbms Week12 Outputs

The document describes 3 PL/SQL programs that use procedures: 1) A greetings procedure that outputs a message, 2) A GCD procedure that finds the greatest common divisor of two numbers, and 3) A prime procedure that finds all prime numbers between 1 and a given value. Each procedure is called with examples showing the input values and output results.
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)
27 views2 pages

Dbms Week12 Outputs

The document describes 3 PL/SQL programs that use procedures: 1) A greetings procedure that outputs a message, 2) A GCD procedure that finds the greatest common divisor of two numbers, and 3) A prime procedure that finds all prime numbers between 1 and a given value. Each procedure is called with examples showing the input values and output results.
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/ 2

1.

Write a PL/SQL program to display greetings by using procedure programming


Output:-
1. Execute Greetings
**Hello** from PL/SQL procedure programming
2. begin
greetings;
end;
Output:-**Hello** from PL/SQL procedure programming
2. Write a PL/SQL program to find the GCD of two numbers by using procedures
Ouput:-
1. Enter value for a: 24
Enter value for b: 72
GCD of 24 and 72 is
24
PL/SQL procedure successfully completed.
2. Enter value for a: 95
Enter value for b: 96
GCD of 95 and 96 is
1
PL/SQL procedure successfully completed.
3. Write a PL/SQL program to find 1 to n prime numbers by using procedure
Output:-
1.Execute prime(20)
Prime number from 1 to n
3
5
7
11
13
17
19

2. begin
prime(30);
end;
/
Output:-
Prime number from 1 to n
3
5
7
11
13
17
19
23
29

You might also like