next page
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.
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.
0