Go Up to isql Command Reference
Specifies whether to display number of rows retrieved by queries.
SET COUNT [ON | OFF];
Turns on display of the “rows returned” message
Turns off display of the “rows returned” message [default]
Description: By default, when a
SELECT statement retrieves rows from a query, no message appears to say how many rows were retrieved.
SET COUNT ON to change the default behavior and display the message. To restore the default behavior, use
SET COUNT OFF.
- Tip: The
OFFkeywords are optional. If they are omitted,
SET COUNTswitches from one mode to the other. Although you can save typing by omitting the optional keyword, including the keyword is recommended because it avoids potential confusion.
Example: The following example sets
COUNT ON to display the number of rows returned by all following queries:
SET COUNT ON; SELECT * FROM COUNTRY WHERE CURRENCY LIKE '%FRANC%';
The output displayed would then be:
COUNTRY CURRENCY =============== ========== SWITZERLAND SFRANC FRANCE FFRANC BELGIUM BFRANC 3 rows returned