6. Query Results
6.1 Result Table: Sort, Show/Hide Columns, Adjust Width
After a query completes, results appear in a table below the editor. You can:
- Sort: Click any column header to sort ascending or descending. Sorting runs in the frontend and affects only the data currently displayed.
- Hide / show columns: Click the Columns button in the toolbar to check or uncheck columns to display.
- Adjust column width: Drag the divider between column headers to resize columns.
The results area uses the same scrollbar styling as the rest of the app for a consistent look when scrolling long result sets.
6.2 Paginated Browsing
Pagination controls appear at the bottom of the results panel:
- Use First / Previous / Next / Last to change pages.
- Choose rows per page from the dropdown: 20 / 40 / 60 / 80 / 100.
- The footer shows the current range (for example, "Showing rows 1–20").
6.3 Execution Time and Row Count
The toolbar shows:
- Total rows: The total number of rows returned by the query.
- Execution time: How long the query took.
Note: The on-screen preview shows at most 500 rows. If the query returns more than 500 rows, use export to get the full dataset.
6.4 Query Error Display
When a SQL query fails, the error message appears directly in the results panel, replacing the result table:
- The error block uses a red border and light red background with a warning icon (⚠). The full error text is shown in a monospace font.
- In error state, the toolbar badge shows Query Error, and the Columns and Export buttons are disabled.
- Pagination controls are hidden in error state.
Error auto-clear: When you run the query again, the results panel immediately switches from error state to a running state (spinner and "Query executing..." text). If the new query succeeds, the panel returns to a normal result table; if it fails again, the new error is shown. If you abort the query from the toolbar, the panel does not enter the Query Error state described above.
Per-tab independence: Each tab keeps its own error state. If Tab A errors and you switch to Tab B (normal), then return to Tab A, the error message is still there.
Tip: Query error details are also sent to the AI assistant (see §12.6). The AI can see your error message and the SQL that triggered it without you copying and pasting, and can help you fix the query.
[Image] Results panel: table, sort indicators, column controls, pagination, and stats