随笔分类 -  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... 阅读全文
posted @ 2015-06-29 22:51 nick_huang 阅读(993) 评论(0) 推荐(0) 编辑
摘要: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; 阅读全文
posted @ 2015-06-29 22:49 nick_huang 阅读(224) 评论(0) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2015-06-29 22:48 nick_huang 阅读(239) 评论(0) 推荐(0) 编辑
摘要: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; ... 阅读全文
posted @ 2015-06-29 22:47 nick_huang 阅读(814) 评论(0) 推荐(0) 编辑
摘要: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; 阅读全文
posted @ 2015-06-29 22:46 nick_huang 阅读(1833) 评论(0) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2015-06-29 22:45 nick_huang 阅读(362) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示