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

DBMS-weeek 8

The document outlines the creation and execution of PL/SQL procedures at Aditya University. It includes examples of a simple greeting procedure and a procedure that sums two numbers with an output parameter. Both procedures are successfully created and executed, demonstrating basic PL/SQL functionality.

Uploaded by

jahnavisindhu673
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)
8 views2 pages

DBMS-weeek 8

The document outlines the creation and execution of PL/SQL procedures at Aditya University. It includes examples of a simple greeting procedure and a procedure that sums two numbers with an output parameter. Both procedures are successfully created and executed, demonstrating basic PL/SQL functionality.

Uploaded by

jahnavisindhu673
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/ 2

Exp No:

Date: Page No:

Week-8
Program:
Creation of procedures:
SQL> create procedure greet
2 as
3 begin
4 dbms_output.put_line('Hello');
5 end;
6 /
Output:
Procedure created.

SQL> begin
2 greet;
3 end;
4 /
Output:
PL/SQL procedure successfully completed.

SQL> set serveroutput on;


SQL> /
Output:
Hello

PL/SQL procedure successfully completed.


SQL> exec greet;
Output:
Hello

PL/SQL procedure successfully completed.

ADITYA UNIVERSITY (Formerly Aditya Engineering College (A)) ROLL NO:


Exp No:
Date: Page No:

Passing parameters IN and OUT of


procedures:
SQL> create procedure sum_c(a in number,b in number,c out number)
2 as
3 begin
4 c:=a+b;
5 end;
6 /
Output:
Procedure created.

SQL> declare
2 d number;
3 begin
4 sum_c(2,7,d);
5 dbms_output.put_line(d);
6 end;
7 /
Output:
9

PL/SQL procedure successfully completed.

ADITYA UNIVERSITY (Formerly Aditya Engineering College (A)) ROLL NO:

You might also like