欢迎来到天天文库
浏览记录
ID:52297448
大小:31.50 KB
页数:1页
时间:2020-03-26
《Oracle数据库系统应用开发实用教程教学全套课件第2版 朱亚兴课件 资源 任务1例8.1-例8.3.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、大型数据库管理系统[Oracle]应用开发广科院任务1.通过过程统计不同部门的员工人数【例8.1】根据输入的部门号统计该部门的员工人数。createorreplaceprocedurepro_count_dept(depnonumber)asn_countnumber;beginselectcount(*)inton_countfromempwheredeptno=depno;dbms_output.put_line('部门号'
2、
3、depno
4、
5、'的员工人数为:'
6、
7、n_count);exceptionwhenno_
8、data_foundthendbms_output.put_line('nodata');end;注意:如果出现编译错误的提示信息可以使用“showerr[or]”命令或者“descuser_errors”命令来进行调试,例如:showerr【例8.2】执行pro_count_dept过程。setserverouton注意:该命令的作用是将SQL*PLUS的输出打开。execpro_count_dept(10)【例8.3】在匿名块中调用过程pro_count_dept。beginpro_count_dept(30);
9、end;
此文档下载收益归作者所有