rows

The .rows command toggles the display of the number of rows returned by a query in rsql. This is useful for quickly verifying the size of your result set, especially when filtering or aggregating data.

Usage

.rows <on|off>

When to use

  • Enable .rows on to always see how many rows your queries return—helpful for data validation and exploration.
  • Disable .rows off for a cleaner output, especially when exporting results or scripting.

Examples

Show the current rows setting:

.rows

Turn on the rows returned display:

.rows on

Turn off the rows returned display:

.rows off

Troubleshooting

  • If you do not see row counts, ensure .rows on is set.
  • For minimal output, use .rows off in combination with .header off and .footer off.

Demonstration