Contoh data meaning bag.2 dengan SQLPlus


Membuat tampilan bilangan ganjil dengan format berikut:
1 3 5 7 9 11

SQL :  set serveroutput on;
     declare
           x number;
begin
x:=1;
while x<=12
loop
if mod(x,2)=1 then
dbms_output.put (x||' ');
end if;
x:=x+1;
end loop;
dbms_output.put_line('');
end;
/

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s