Comments in PL/SQL

0
Comments in PL/SQL:
  • PL/SQL compiler ignores comments.
  • Comments promote readability and aids understing.
  • PL/SQL supports two types comments
              -> Single line comments(--)
              -> /* Multi Line comments */
Comment Example:
Store the employee No is NOT NULL(compulsory), employee Name and constant the employee Department fixed on Web Designer using the Variable.
Exmple Code:
SQL> set serveroutput on
SQL> DECLARE
    --assign value into eno variable
         eno number(4) NOT NULL := 1001;   
         ename varchar2(10) := Net Lo Java;

    /* Constant value is fixed for job value is "Web Designer"
    is fixed all program not required declare all times. */


          job CONSTANT varchar2(10) := Web Designer;
          BEGIN
          dbms_output.put_line('Declared Value:');
          dbms_output.put_line(' Eno: ' || eno || ' EName: ' || ename);
          dbms_output.put_line(' Job: ' || job);   
          END;


 Click here to go to Back page

About the author

Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus. Aenean fermentum, eget tincidunt.

0 comments:

Recent Posts