Friday, 26 November 2010

do While Loop PL/SQL Oracle...

There is nothing like do while loop in PL/SQL. But you can do the following:

SQL> declare
2 n_num number := 1;
3 begin
4 loop
5 dbms_output.put(n_num||', ');
6 n_num := n_num + 1;
7 exit when n_num > 5;
8 end loop;
9 dbms_output.put_line('Final: '||n_num);
10 end;
11 /

For details visit: http://www.dba-oracle.com/concepts/pl_sql_repeat_until_loop.htm

No comments:

Post a Comment

Using Handlebar Prompt in Semantic Kernal

> dotnet add package Microsoft.SemanticKernel.PromptTemplates.Handlebars --version 1.30.0 using Microsoft . SemanticKernel ; using Micr...