First Program – PL/SQL

A simple program in PL/SQL


Above program executed and printed the output as “PL/SQL procedure successfully completed.” but not printed “Hello Learner”.

We need to execute “SET SERVEROUTPUT ON” if we need to see the output of the code.


Declaring and usage of variables in program


Here, DECLARE statement is used to declare the variables and := operation is used to assign value to the variable.

DBMS_OUTPUT.PUT_LINE is used to print the values.

Commenting Codes

Comments let you include  text within your code to explain what the code does. PL/SQL compiler ignores comments.

PL/SQL supports two types of comments.

  • Single line comments (- -)
  • Multi line comments (/*    ……….*/)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s