:: Environment DB2 V7.1.1 on Z/OS. ::
I am looking for a sql query that would return rows 20 through 30 of a query.
For example
select * from ( select a.*, rownum rnum from (select job, empno from emp order job asc) a )where rnum>=20 and rnum<30
This is in oracle, but is there a way to do...
select * from ( select a.*, rownum rnum from (select job, empno from emp order job asc) a )where rnum>=5 and rnum<7
This is query used to retrieve rows 2 rows, i.e., the 5th and 6th rows from the complete query run above. Of course, this is in oracle, but is there a way to do this using db2...
Hi all,
I am trying to learn DB2 on os390 and this is my version is :
Database server = DB2 OS/390 7.1.1
I was trying to run this query
=====================
SELECT EMPNO, RANK() OVER(ORDER BY EMPNO) AS RANK# ,DENSE_RANK() OVER(ORDER BY EMPNO) AS DENSE# FROM DSN8710.EMP ORDER BY EMPNO...
Hi all,
I am new to Db2 but not to databases.
Here is a snippet of my code
=============
Connection conn = getConnection();
Statement stmt;
stmt = conn.createStatement();
DatabaseMetaData dbmd = conn.getMetaData();
ResultSet rs = dbmd.getPrimaryKeys(null, null, tableName);
cat.debug("b4...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.