_TALLY System Variable Example

This example uses SELECT to return the number of customers in the USA. The result is automatically stored to _TALLY. The _TALLY value is displayed.

SELECT * FROM customer ;
   WHERE country = 'USA' ;
   INTO CURSOR temp
? _TALLY