Save, reuse, and version SQL scripts
Keep named workspace scripts, saved history, local copies, file revisions, and shared scripts in their intended scopes.
When to use this
Give a script a name and context, save it in the right library, then review versions before restoring.
Use this when keeping named scripts, reusing saved SQL, or reviewing earlier local versions.
Before you start
Local libraries are device-specific. Team libraries need account and API access.
Steps
- Open SQL Editor, then AI & Sql Editor > SQL Script Library.
- Choose a storage scope: workspace, local common history, file version, or team library.
- Save or load a named SQL item and check its tags and environment.
- Compare versions before restoring; loading SQL does not execute it.
How to verify the result
The SQL is stored in the chosen scope, and loading it only places text in the editor.
Troubleshooting
- If a saved script is missing, check the active workspace and whether it belongs to history, Workspace Library, or a local file.
- If revision controls are unavailable, confirm that the item has a prior saved version and that the current build supports version history.
Limits
- Local libraries and file snapshots keep up to 100 prior versions.
- Workspace packages do not include SQL libraries or file-version snapshots.