Skip to content

Multi-Statement Run Tab

When you run a script that contains more than one statement, DBCode shows a Run tab that anchors the whole batch. It reports live progress while the script executes, then a summary when it finishes. You no longer get one result tab per statement.

DBCode decides where each statement’s result goes based on whether it returns columns:

  • SELECTs (anything that comes back with columns, including INSERT ... RETURNING, MERGE ... OUTPUT, CALL returning a resultset, SHOW, DESCRIBE, and so on) still get their own result tab with a data grid.
  • DML and DDL (INSERT, UPDATE, DELETE, CREATE, ALTER, and similar statements that return only a row count) flow into the Run tab’s per-statement list and the output log. They no longer open individual tabs.

The Run tab is the tab that shows while the batch is executing. What happens when the batch finishes depends on what it produced:

  • All SELECTs, no errors - the Run tab is dismissed and focus moves to the first result tab. You just see your result grids, exactly as before.
  • Any DML/DDL, or any error - the Run tab stays, showing the batch summary and per-statement detail.

Single-statement execution is unchanged: a SELECT shows its grid, an INSERT shows “Success, N rows affected”.

The Run tab shows live progress:

  • How many statements have completed out of the total
  • Total rows affected so far
  • Elapsed time
  • The statement currently executing (for supported drivers)

A Cancel button on the Run tab stops the batch.

The Run tab summarizes the run: total statements, total rows affected, and total time. If any statement failed, each error is listed with its line number. Every statement is also recorded in the output log (the notepad icon on the left of the results panel), which keeps a history across runs.

If a batch produces a lot of SELECT results, the first several open as individual tabs and the rest collect into a single stacked overflow tab, so a script with hundreds of queries does not flood the panel with tabs. Use the existing Unstack action to split the overflow tab back into individual tabs.

Controls how many individual SELECT result tabs a batch opens before extra results stack into the overflow tab. The default is 15. Set it to 0 to disable overflow entirely, so every result gets its own tab.

The same behavior applies to multi-statement SQL notebook cells: the cell output shows a Run tab following the same rules.