0

I am new to SQL and I have a large table with several hundred rows that I need to view all of its row. Is there a command in SQL that would act like the less command in Linux that would allow me to step one screen height at a time through the output of a select statement? So the pseudo-code for what I'm after would be, for example:

SELECT * from table less
halfer
  • 19,824
  • 17
  • 99
  • 186
Stacey
  • 4,825
  • 17
  • 58
  • 99

2 Answers2

0

What you're looking for is called "paging" or "pagination"

This QA has a more thorough answer: How universal is the LIMIT statement in SQL?

Dai
  • 141,631
  • 28
  • 261
  • 374
0

ANSI SQL supports TOP N

SELECT TOP 10 * from table

Certain other dialects of SQL like SQLite support LIMIT

In DB2, you need to use SELECT * from TABLE FETCH FIRST 10 rows only

suresubs
  • 144
  • 5