SET MAXROWS or SET ROWCOUNT
SET {MAXROWS | ROWCOUNT} [n]
Setting maxrows to zero, which is the default when isql is started, results in a select statement returning all rows which meet the criteria in the where clause.There are circumstances where you do not want lots and lots of output scrolling up the screen, so you may set maxrows to a smaller number and all subsequent select statements will only display the first n rows instead of everything.
|
Note
|
In older versions of |
SQL> set count on;
SQL> set maxrows 0;
SQL> select emp_no from employee;
EMP_NO
=======
2
4
...
144
145
Records affected: 42
SQL> set maxrows 10;
SQL> select emp_no from employee;
EMP_NO
=======
2
4
...
15
20
Records affected: 10
There is no indication that maxrows is restricting the number of rows returned.It is the responsibility of the user to remember, or check whether maxrows is on or off.Using maxrows can lead to confusion about exactly how many rows there are in a table!