declare v_ename emp.ename%type; begin select ename into v_ename from emp where empno=&gno; dbms_output.put_line('名字:'||v_ename); exception when no_data_found then dbms_output.put_line('编号没有!'); end; 显示结果就是我们自己定义的了 命名的系统异常 产生原因 ACCESS_INTO_NULL 未定义对象…
select * from (select rownum rn,e2.* from (select e1.* from emp e1)e2 where rownum<=10)e3 where e3.rn>=6; select * from (select rownum en,e.* from emp e) select e.deptno,e.ename,d.dname,e.mgr,s.grade from (select avg(sal)ea from emp)e1,emp e,salgrad…
原来项目中oracle数据库一直是US7ASCII,我新项目对接的时候,查询以及插入中文,出现乱码问题. 暂时未能解决此问题,最终决定每次转码: 查询的时候: List<Record> list = Db.use("oracle").find("select * from order order by id desc"); for (Record record : list) { String str = record.getStr("depa…