Thursday, 28 July 2011

Writing and Running PL/SQL Program in windows

Step1) Write the PL/SQL code in the note pad and save it as with extension name .sql
ex: "test.sql"

DECLARE
x NUMBER;
BEGIN
x := 72600;
dbms_output.put_line('The variable X = ');
dbms_output.put_line(x);
END;
/

step 2) oracle sql*plus
type
SET SERVEROUTPUT ON
@ c:\orabook\test.sql

OUTPUT:
SQL> set serveroutput on
SQL> @ c:\orabook\test.sql
The variable X =
72600

PL/SQL procedure successfully completed.


Thursday, 28 July 2011

Writing and Running PL/SQL Program in windows

Step1) Write the PL/SQL code in the note pad and save it as with extension name .sql
ex: "test.sql"

DECLARE
x NUMBER;
BEGIN
x := 72600;
dbms_output.put_line('The variable X = ');
dbms_output.put_line(x);
END;
/

step 2) oracle sql*plus
type
SET SERVEROUTPUT ON
@ c:\orabook\test.sql

OUTPUT:
SQL> set serveroutput on
SQL> @ c:\orabook\test.sql
The variable X =
72600

PL/SQL procedure successfully completed.