随笔分类 - Oracle PLSQL 语法
摘要:declare v_sal number := 6000; begin loop v_sal := v_sal + 1; dbms_output.put_line(v_sal); if v_sal = 8000 then exit; end if; end loo...
阅读全文
摘要:declare v_sal number := 6000; begin while (v_sal < 8000) loop v_sal := v_sal + 1; dbms_output.put_line(v_sal); end loop; end;
阅读全文
摘要:declare v_display varchar2(10); begin for i in 1 .. 100 loop for j in reverse 1 .. 10 loop dbms_output.put_line(i || ' - ' || j); end loop; end loop...
阅读全文
摘要:declare v_job varchar2(50) := 'Programmer'; v_sal number; begin if v_job = 'Programmer' then v_sal := 6000; elsif v_job = 'Senior Programmer' then v_sal := 8000; ...
阅读全文
摘要:declare v_sal number; begin select t.sal into v_sal from scott.emp t where rownum <= 1; dbms_output.put_line(v_sal); end;
阅读全文
摘要:declare v_sal number(5) := 6000; begin --if you could not see the output in console, you should set output on first use the command in command line : set serveroutput on dbms_output.put_l...
阅读全文