how to use page break in sql?
is there is any way to use page break in sql.actually am generating report with the help of shell scr开发者_如何学Cipt spool command.i need to break the report to next page once it got reach at line number 35. how to write sql statement for this?
You should do this in your calling application, pagination of output is not something SQL is suited for.
Well, I think that LIMIT is what you need. like this:
SELECT * FROM `your_table` LIMIT 0, 10
(This will display the first 10 results from the database)
SELECT * FROM `your_table` LIMIT 5, 5
(This will show records 6, 7, 8, 9, and 10)
SELECT * FROM `your_table` LIMIT 20, 10
(This will return 10 records from 21st record. That is from 21st record to 30th record)
Hope this helps
精彩评论