Topic: SQL*Plus and PL/SQL >> for loop!!!!!
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Rush |
Posted: Mar 16, 2007 05:28:07 AM |
Total Post: 127
Joined: Jan, 2007
|
hi all,
is there way to increase for loop by 2 (more tah 1)in pl/sql;
by default it takes 1 but i want to increase by 2.
thanks in advance
RUPESH |
|
|
Vigyan |
| Posted: Mar 16, 2007 11:15:27 AM | |
|
Total Post: 386
Joined: May, 2001
|
I dont think so. You can not change "FOR" loop increment. You can do something like that.
declare
i number;
begin
i:=0;
loop
dbms_output.put_line(i);
i:=i+2;
exit when i > 10;
end loop;
end;
Hope it helps.
Vigyan
|
|
|
|
|
Rush |
| Posted: Mar 19, 2007 12:23:41 AM | |
|
Total Post: 127
Joined: Jan, 2007
|
hi Vigyan thanx for your support.
nice to see your reply :)
RUPESH
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Vinoth Kumar | 357 |
| Gopu Gopi | 340 |
| Gitesh Trivedi | 322 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|