Write a PL-SQL block to print all odd numbers between 1 and 10 using a basic loop
DECLARE
i integer(2):=1;
BEGIN
LOOP
dbms_output.put_line(i);
i:=i+2;
if(i > 10) then
exit;
end if;
END LOOP;
END;
/
DECLARE
i integer(2):=1;
BEGIN
LOOP
dbms_output.put_line(i);
i:=i+2;
if(i > 10) then
exit;
end if;
END LOOP;
END;
/
This website uses cookies to ensure you get the best experience on our website.