How to understand and memorize a PL/SQL Function ?
Watching this 10 steps of a PL/SQL function you can very easily understand and memorize a Function format.
1.create or replace function f_name --(name of function)
2.(peramiter /*(2.1 ) in/out/in out */ in number) --(Parameter )
3.return varchar2 -- (Return)
4.IS --( use of IS or AS)
5.v varchar2(200) ; --(Declare variable if needed with ;)
6.begin --(Execution)
7.select first_name into v -- (Passing value into the variable using INTO )
from employees
where employee_id=n ;
8.return v ; --(Return value with ;)
9. exception ; --(Exception if needed with ;)
10. end ; --(End with ;)
To run the function:
select last_name , f_name(100) from employees
where employee_id=198;
Remember There are 10 Step in a Function
Muhammad Abdul Qaium is a Database Engineer/Oracle Apex Developer/BI Developer (in Atlanta, USA) who is an Oracle Certified Cloud Architect Professional, OCI Autonomous DB specialist as well as Oracle Business Intelligence Foundation Suite 11g Certified Implementation Specialist with extensive expertise in Database design , PL/SQL, Oracle Apex, Microsoft SSIS, ETL, Power BI, Qlik Sense, OBIEE. Contact: qaiuminfo@gmail.com
Search This Blog
Subscribe to:
Post Comments (Atom)
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=...
-
Search by keyword from Oracle Database Objects. select owner, type, name, line, text from dba_source where 1 = 1 and text like '%TEXT Y...
-
We Can Export Application Components individually from Oracle Apex. Application > Shared Components > Export Application Compo...
No comments:
Post a Comment