SQL Language (MOSC)

MOSC Banner

next page

edited Feb 9, 2012 5:40AM in SQL Language (MOSC) 4 commentsAnswered
Hi, dear friends,
DROP TABLE test;
CREATE TABLE test (a NUMBER, b NUMBER);
INSERT INTO test VALUES(1,1);
INSERT INTO test VALUES(1,2);
INSERT INTO test VALUES(1,3);
INSERT INTO test VALUES(2,1);
INSERT INTO test VALUES(2,2);
INSERT INTO test VALUES(2,3);
COMMIT;
SELECT * FROM test ORDER BY a,b
A B
1 1
1 2
1 3
2 1
2 2
2 3


I am doing pagination. To simplify it, 2 rows per page.

So I read the first 2 rows and display them. When the user click on the next button the query should select from the 3rd row downward.
SELECT * FROM test WHERE a >= 1 AND b >= 2
won't give proper answer.

What I am looking for is to have a simple query that gives me the result from the third row and down.  

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center