摘要: --1,写匿名块,输入三角形三条边的长度。在控制台打印三角形的面积。 declare v_a number(8,2):=&输入第一条边; v_b number(8,2):=&输入第二条边; v_c number(8,2):=&输入第三条边; v_p number(8,2); v_if number(20,2); v_area number(8,2); begin ... 阅读全文
posted @ 2019-05-07 21:26 烟云缥缈 阅读(361) 评论(0) 推荐(0) 编辑
摘要: --while循环(条件成立时执行) declare pnum number:=1; while pnum<=10 loop dbms_output.put_line(pnum); pnum:=pnum+1; end loop; end; --loop循环(条件成立时退出) declare pnum 阅读全文
posted @ 2019-05-07 19:44 烟云缥缈 阅读(524) 评论(0) 推荐(0) 编辑
摘要: cursor分为三种,一是直接声明为cursor变量,二是首先声明类型再声明变量,三是声明为sys_refcursor。 (1)直接声明 declare cursor emp_cur is select * from emp; emp_record emp%rowtype; begin open e 阅读全文
posted @ 2019-05-07 18:46 烟云缥缈 阅读(507) 评论(0) 推荐(0) 编辑

You win!