Search This Blog

Saturday, July 8, 2017

Easy way to understand and catch a PL/SQL Procedure ( 7 step of a Procedure)

How to understand and memorize a PL/SQL Procedure?
Procedure Using Multiple OUT mood parameter .

Watching this 10 steps of a PL/SQL Procedure you can very easily understand and memorize a Procedure format.


1. create or replace Procedure P_emp_name  --(Procedure Name)
2. (e_id in number, f_na out varchar2, l_na out varchar2)  --(Parameter Using IN/ OUT )
3. declare --(if needed)
3. IS --(IS/AS)
4. begin --(Execution)
5. select first_name, last_name /*5.1 */ into f_na, l_na  --(Passing value into the variable using INTO )
from employees
where employee_id=e_id ;
6.exception ; --(Exception if needed with ;)
7. end ;  --(End with ;)

EXECUTE: 

declare
f varchar2(50);
la varchar2(50);
begin
P_emp_name(100,f,la);
dbms_output.put_line('Name:' || f || '  ' || la);
end;
/

Remember There are  10 Step in a Function 

No comments:

Post a Comment

Check Difference Between Two Database Objects

Step-1. Create Two DBLINK to connect with Two Database then Step-2. define logindb= DBLINKONE define remotedb= DBLINKTWO define schema_name=...