declare BEGIN ----你的语句块 EXCEPTION WHEN NO_DATA_FOUND THEN NULL; -- 捕获错误不执行 END; /
declare cursor mycursor1(v_line number,v_page number) is select ename from (select rownum id,emp.ename ename from emp) where id between (v_line*(v_page-1)+1) and v_line*v_page; v_ename emp.ename%type; begin if not mycursor1%isopen then open mycursor1(&行数,&页数); end if; loop fetch mycursor1 into v_ename; exit when mycursor1%notfound; dbms_output.put_line(v_ename); end loop; close mycursor1; exception when NO_DATA_FOUND then dbms_output.put_line('对不起'); end;
这是开始我写的 SQL code
Code highlighting produced by Actipro CodeHighlighter (freeware) http://w
eclipse 3.3启动web工程,要连接oracle9i数据库报 严重: Cannot create PoolableConnectionFactory (Listener refused the connection with the following error: ORA-12518, TNS:listener could not hand off cli ......