Structure of pl-sql program

Advertisements

Input Output PLSQL First Example in PLSQL

Structure of pl-sql program

pl-sql program is very easy to write and execute, Here i will show you in very simple way. pl-sql program contains mainly four section, they are given below;

  • Declare section
  • Begin section
  • Exception section
  • End section

Syntax

declare				-------- 1
declaration variable;
begin				-------- 2
statement-1;
....................
statement-n;
exception			-------- 3
exception handling statements
end;				-------- 4
  • Declare section: In this section user declare all the variables, cursor declaration etc.
  • Begin section: In this section, you need to declare all the executable statements, logical statements etc.
  • Exception section: In this section you need to write all the exception handling statements, which is used to convert system defined error message into user friendly error message.
  • End section: In this section represent end of the pl-sql program or block.

Example

begin
dbms_output.put_line("Hello word");
end;

Input Output PLSQL First Example in PLSQL

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements