Notebooks
Getting Started
Creating a New Notebook
Section titled “Creating a New Notebook”In Connections, hover over a database and select Create New DBCode Notebook. The notebook opens with one SQL cell already linked to the selected connection, database, and default schema.

Working with Cells
Section titled “Working with Cells”Adding a Cell
Section titled “Adding a Cell”Use Code or Markdown in the notebook toolbar to add a cell. You can also open More Actions… in a cell toolbar and choose Insert Cell, or hover between cells or below the final cell to reveal the insert controls.
Changing a Cell Type
Section titled “Changing a Cell Type”Open More Actions… and select Change Cell to Markdown to change a SQL cell to Markdown. The same menu lets you change a Markdown cell back to code.
Executing Queries
Section titled “Executing Queries”Select Execute Cell to the left of a SQL cell to run it and display the result below the cell.

Use Run All in the notebook toolbar to execute every SQL cell. The selected cell toolbar also provides Execute Above Cells and Execute Cell and Below.
Result Behavior
Section titled “Result Behavior”Result Tabs in Notebooks
Section titled “Result Tabs in Notebooks”Each execution creates a result tab for that cell. By default, DBCode keeps up to three tabs. Use dbcode.notebook.maxTabs to change the limit.
When dbcode.notebook.maxTabs is set to 1, running the cell again refreshes the existing result tab and preserves its chart configuration.
Note: Unlike the SQL Editor, the Shift key modifier for toggling refresh-in-place is not available in notebooks since Shift+Enter is used to run cells. Use single-tab mode if you always want to refresh in place.
Saving Outputs
Section titled “Saving Outputs”Notebook outputs are not saved in the file by default. Select Save Output: Off in the toolbar to enable output saving before you save the notebook.
Saved outputs can contain sensitive data. Review them before sharing a notebook.
Cell Management
Section titled “Cell Management”Joining Cells
Section titled “Joining Cells”Open More Actions… in the cell toolbar to find the insert and join commands.

- Join With Previous Cell combines the current cell with the cell above it.
- Join With Next Cell combines the current cell with the cell below it.
- Join Selected Cells combines all selected cells.
Tips for Getting Started
Section titled “Tips for Getting Started”- Start Simple: Begin with basic SQL queries to get familiar with the interface.
- Use Markdown: Add Markdown cells to document your analysis and findings.
- Experiment: Notebooks are useful for iterative data exploration.
- Save Frequently: Save your work as you progress.
Next Steps
Section titled “Next Steps”Once you’re comfortable with the basics, explore:
- Python Integration to analyze SQL results with Python
- Exporting your notebooks
- Cell Locking for specific database connections
- Query Parameters for dynamic queries across cells