SQL*Plus Tutorial


SqlPlus create Pl/SQL block

To create and use Oracle Pl/SQL block in SQLPlus you must declare the variables and use the begin end block.

SQLplus Pl/SQL block



variable x number
variable y varchar2(50)
variable z varchar2(150)
BEGIN
:x:=5;
:y:='The result is ';
:z:=:y||:x;
END;
/

PRINT z