Answers for "oracle pagination query"

SQL
6

sql pagination oracle

SELECT * FROM (
    SELECT a.*, rownum rn
    FROM (
        SELECT * FROM ORDERS WHERE CustomerID LIKE 'A%'
        ORDER BY OrderDate DESC, ShippingDate DESC
    ) a
    WHERE rownum < ((pageNumber * pageSize) + 1 )
)
WHERE rn >= (((pageNumber-1) * pageSize) + 1);
Posted by: Guest on July-10-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language