CREATE OR REPLACE PACKAGE PACK_PAGINATION AS PAGESIZE CONSTANT ; TYPE TYRECORD_EMP IS RECORD( EMPNO EMP.EMPNO%TYPE, ENAME EMP.ENAME%TYPE, JOB EMP.JOB%TYPE, MGR EMP.MGR%TYPE, HIREDATE EMP.HIREDATE%TYPE, SAL EMP.SAL%TYPE, COMM EMP.COMM%TYPE, DEPTNO EMP…
create or replace package body Get_RecordByPage is StrSQL ); --分页函数 procedure GetRecordByPage(tblName in varchar2, FLDName in varchar2, PageSize in number, PageIndex in number, strWhere in varchar2, orderType in varchar2, r_cur out myCur) is pageMax…
select * from EMP eselect * from dept dselect * from salgrade s--Oracle特有函数 case whenselect case 2 when 1 then '一' when 2 then '二' when 3 then '三' else '其他' end from dual;--Oracle特有函数 decodeselect decode(3,1,'一',2,'二',3,'三','其他')from dual;--查询员工的领导信息…
select t2.* from --两层嵌套 (select t.* , rownum as row_numfrom t where rownum <=20) t2 where t2.row_num > 11 select t3.* from ( --三层嵌套select t2.*, rownum as row_num from (select * from t) t2 where rownum<=20) t3 where t2.row_num>11 两层嵌套 ==三…