Sample rows
samplePeek at a few real rows from a table to inspect data before writing queries. Returns rows with optional filters and formats.
Instructions
Peek at a few real rows of one table (SELECT * … LIMIT n, in storage order, no sorting) to see what the data looks like before writing a query. Use query instead for specific columns, joins, sorting or aggregates, and count when you only need a number. Returns rows[N]{all columns} plus rows, truncated (true = more rows exist) and ms. Default 20 rows, capped by the server's max rows setting. On failure returns isError with 'error: ' (e.g. refused statement, unknown table, SQL error).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Rows to return (default 20; capped by settings, usually 200). | |
| table | Yes | Table or view name as returned by `tables`. PostgreSQL tables outside `public` are written schema.table. | |
| where | No | Optional SQL boolean expression WITHOUT the WHERE keyword, e.g. status = 'paid' AND total > 100. | |
| format | No | Result format. Default from settings: toon (compact table: rows[N]{cols}: then one line per row). | |
| database | No | Optional database to use instead of the connection's default (names from `databases`). Omit to use the default. | |
| connection | Yes | Connection name exactly as returned by `connections` (e.g. "shop"). Unknown or unexposed names return an error. |