Dec
13

While Loop in PL/SQL

By admin  //  Oracle  //  View Comments

Syntax:

WHILE < Condition  true> LOOP

<Statement>

END LOOP;

Example:

DECLARE

cnt NUMBER:=0;

BEGIN

WHILE cnt<=10 LOOP

cnt:=cnt+1;

Message (‘While loop executes);

END LOOP;

END;

Related posts:

  1. Trigger in PL/SQL
  2. LOOP in PL/SQL
  3. Procedure in PL/SQL
  4. Function in PL/SQL
blog comments powered by Disqus

Namaste!

Hello! This is Nirmal Gyanwali, a freelance web developer from Kathmandu, Nepal. I am well versed with Open source CMS and portal frameworks like Joomla!, Wordpress, Drupal. If you're interested, you can contact me at info@nirmal.com.np.
Thanks!

Latest Tweets