Documentation Home
MySQL Shell for VS Code


MySQL Shell for VS Code  /  Getting Started  /  Notebook Editors

Pre-General Availability: 2024-03-18

2.4 Notebook Editors

The DB Notebook and MySQL Shell Consoles work areas provide an embedded editor, which combines elements of a classic terminal and a visual notebook-interface-styled editor. Each work area supports a different set of programming languages:

  • DB Notebooks: SQL, TypeScript, and JavaScript

  • MySQL Shell Consoles (Shell Sessions): SQL, Python, and JavaScript

The terminal-like nature is best seen by the interactive behavior used in the notebook-interface-styled editor: one command, one result. The visual aspect comes into play when showing result data (tabular and tabbed result sets, graphic images, or JSON output) and when interacting with past commands (re-execution in place).

A notebook editor invokes a virtual document that can, in theory, grow endlessly. It is sometimes referred to as an endless editor. There are memory limits, which also limit the data that can be held available for jumping back and forth in the document.

Figure 2.2 MySQL Shell for VS Code - Prompts and Output Areas in Notebook Editors

Content is described in the surrounding text.

To select an active language in a DB Notebook work area, type:

  • \sql to make SQL the active language.

  • \js to make JavaScript the active language.

  • \ts to make TypeScript the active language.

Press Ctrl+Enter to execute the current statement, code snippet, or command.