Documentation Home
MySQL Shell for VS Code

MySQL Shell for VS Code  /  Database Connections and DB Notebooks  /  Commands in a DB Notebook

Pre-General Availability: 2024-05-02

4.3 Commands in a DB Notebook

MySQL Shell commands issued within a DB Notebook enable you to perform routine actions quickly. The following commands are independent of the processing mode and must start with the \ character:


Provides a quick welcome message that instructs you to use Ctrl+Enter to execute your query or code block.


Aliases: \h, \?

Provides a brief description and usage example of a DB Notebook's interactive prompt and identifies the current mode. If you type \ at the prompt, the editor replaces it with the last command you entered by default.

Help information is mode-dependent. In SQL mode, you see examples of queries using placeholder characters, such as * and %. In JavaScript or TypeScript mode, you see a list of global function for activities such as sending a value to the output area, running a query from the current language, and processing a query interactively.


Alias: \js

Switches to the JavaScript language mode.


Establishes a new connection to the server based on the current connection details.


Switches to the SQL language mode.


Alias: \ts

Switches to the TypeScript language mode.

Use Ctrl+Enter to execute the command. Any output is displayed below the command. Any errors are also displayed below the command.