************************************************
USING SQL FUNCTION IN PL/SQL BLOCK
************************************************
SET SERVEROUTPUT ONDECLARE
A VARCHAR2(30):=LOWER('ARKA BHATTACHARYA');
BEGIN
DBMS_OUTPUT.PUT_LINE('THE LOWERCASE NAME ::::'||A);
DBMS_OUTPUT.PUT_LINE('THE UPPERCASE NAME ::::'||UPPER(A));
END;
---------------------------------------------------------------
************************************************
NESTED PL/SQL BLOCK
************************************************
<DECLARE
A NUMBER(5):=10;
B NUMBER(6):=20;
BEGIN
DECLARE
A NUMBER(5):=10;
B NUMBER(6):=20;
BEGIN
B:=A+B+OUTER.B;
DBMS_OUTPUT.PUT_LINE('THE SUM IS ' ||B);
END;
DBMS_OUTPUT.PUT_LINE('THE SUM IS ' ||B);
END;
---------------------------------------------------------------
No comments:
Post a Comment