SAVE Statement

Saves the notebook to disk.

Syntax

SAVE;
SAVE filename;

Parameters

Examples

Remarks

The SAVE statement is particularly useful in scripts to ensure changes are persisted to disk.

Important: The SAVE statement only works outside of a transaction. If you have an active transaction, SAVE will fail with an error. Because the SQL Notebook UI defaults script execution to "Implicit BEGIN ... COMMIT" transaction mode, the SAVE command will produce an error when first attempted in the UI. To use SAVE in the UI, you must change the transaction mode to "None (auto-commit)" before executing your script.

This transaction limitation does not affect the SqlNotebookCmd command line tool, which does not use implicit transactions.