删除不存在的数据并不会促发Oracle的异常对于deletefromdeptwheredeptno=p_deptno;判断是否有数据被删除可以用sql%rowcount,sql%notfound来判断ifsql%rowcount=0thendbms_output.put_line('部门删除失败...');endif;或者ifsql%notfoundthendbms_output.put_line('部门删除失败...');endif;