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

Azure OpenAI Architecture Patterns & Deployment Patterns

Sharing some useful links that will help customers architect Azure OpenAI solution using the best practices: (1) Azure OpenAI Landing Zone r...