Use AI Assistant in SQL Editor

Last modified: June 19, 2025

You can access AI Assistant directly from SQL Editor.

1. On the SQL toolbar, click New SQL to open SQL Editor.

2. Select the code fragment and right-click it to open the shortcut menu.

3. Hover over AI Assistant, then select one of the following options:

  • Explain SQL – Creates a request in a new AI chat to explain the selected code fragment.
  • Optimize SQL – Creates a request in a new AI chat to optimize the selected code fragment.
  • Fix SQL – Creates a request in a new AI chat to identify potential issues and suggest fixes for the selected code fragment.
  • Send Selection to New Chat – Opens a new AI chat and pastes the selected fragment into the input field.

Use AI in SQL Editor