Creating a notebook
You can create a notebook to organize, annotate, and share multiple SQL queries in a single document.
To create a notebook
-
From the navigator menu, choose the Editor icon ( ).
-
Choose the plus icon ( ), and then choose Notebook.
By default, a SQL query cell appears in the notebook.
-
In the SQL query cell, do one of the following:
-
Enter a query.
-
Paste a query that you copied.
-
-
(Optionally) Choose the plus icon ( ), then choose Markdown to add a Markdown cell where you can provide descriptive or explanatory text using standard Markdown syntax.
-
(Optionally) Choose the plus icon ( ), then choose SQL to insert a SQL cell.
You can rename notebooks using the pencil icon ( ).
From the menu icon ( ), you can also perform the following operations on a notebook:
-
Share with my team – To share the notebook with your team as defined by tags. To share a notebook with your team, make sure that you have the principal tag
sqlworkbench-team
set to the same value as the rest of your team members in your account. For example, an administrator might set the value toaccounting-team
for everyone in the accounting department. For an example, see Permissions required to use the query editor v2 . -
Export – To export the notebook to a local file with the
.ipynb
extension. -
Import query – To import a query from a local file into a cell in the notebook. You can import files with
.sql
and.txt
extensions. -
Save version – To create a version of the notebook. To see versions of a notebook, navigate to your saved notebooks and open Version history.
-
Duplicate – To create a copy of the notebook and open it in a new notebook tab.
-
Shortcuts – To display the shortcuts available when authoring a notebook.