SET COUNT

From InterBase

Go Up to isql Command Reference


Specifies whether to display number of rows retrieved by queries.

SET COUNT [ON | OFF];
Argument Description

ON

Turns on display of the “rows returned” message

OFF

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.

Use SET COUNT ON to change the default behavior and display the message. To restore the default behavior, use SET COUNT OFF.

Tip: The ON and OFF keywords are optional. If they are omitted, SET COUNT switches 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