Display a range of rows from a table using oracle SQL -
i need display rows 256 700 table 'customers'. customers table can have rows in millions. customers table has primary key defined on 'cust_id'
probably fastest way this:
select c.* (select rownum seqnum, c.* customers c rownum <= 700 ) c seqnum >= 256; the caveat order of rows not defined in select query. things in right order, should use:
select c.* (select rownum seqnum, c.* (select c.* customers c order cust_id ) c rownum <= 700 ) c seqnum >= 256;
Comments
Post a Comment