Deprecated: Function set_magic_quotes_runtime() is deprecated in /nfs/c01/h08/mnt/2939/domains/cidamon.com/html/blog/textpattern/lib/txplib_db.php on line 14
Cidamon: Blog: oracle pl/sql sample
oracle pl/sql sample
25 June, 2010

Here is a simple example of using pl/sql in oracle

– To enable output
SET SERVEROUTPUT ON;
– declare necessary variables
DECLARE
caseNumber    NUMBER;
name    VARCHAR(200 BYTE);
grade    VARCHAR(1 BYTE); 
BEGIN
– Lets consider we have a package named “SamplePackage” and it has a procedure named
– “SampleProc” which has 1 input parameters and 2 output parameter. Input parameter
– is number . Output parameters are both varchars
SamplePackage.SampleProc(caseNumber, name, grade);
– to generate script output
DBMS_OUTPUT.PUT_LINE(‘ Name of the student is ‘ || name || ‘ and student”s achieved grade is ‘ || grade);
END;

---

Comment