Skip to content

Quick start with AI

Work through a typical flow in the SQL editor using AI assistant - from writing a query, to fixing an error, to understanding objects.

To get started, open Window -> Preferences -> General -> AI, choose a provider, and paste your API token. Then adjust preferences to match your workflow.

Tip

Different vendors have different limits, models, and regions. Pick what fits your data policy and budget.

Start in the SQL Editor

  1. Open the SQL editor.
  2. Click AI on the main toolbar, or from the editor toolbar.

  3. Pick a connection.

    Info

    Optionally set a scope to improve accuracy on large instances.

  4. Type what you need in AI chat.

  5. Execute or refine.

For details, see AI chat.

Talk instead of typing

Prefer voice? Use speech recognition in AI Chat to turn speech into a prompt, review, and send.

  1. Open AI chat
  2. Click the microphone , speak, edit if needed
  3. Execute or refine.

For more, see AI speech recognition.

Generate directly in the editor with @ai

Want to stay focused in the SQL editor? Use @ai when you don’t need the full chat flow.

  1. In the SQL editor, enter @ai your request...
  2. Execute and review

Warning

Depending on your execution settings, AI commands may run without preview. Enable confirmations if you prefer to review first.

When the SQL looks right, validate it or quickly understand its intent before you run it on real data. For more, see AI command.

Understand what the query is doing

Need a clear explanation, risks, or edge cases?

  1. Select the SQL
  2. Right-click, AI commands -> Explain query using AI
  3. Read the explanation in AI chat, and ask follow-ups

For details, see Explain query using AI.

Get inline AI query suggestions

Prefer autocomplete-style help? Let AI suggest a full statement as ghost text based on a short intent comment.

  1. Write your query in the SQL editor
  2. Add a brief intent comment

    Example

    -- find flight with flight_id equal or less then 1230
    SELECT
    
  3. Right-click, AI commands -> Show AI Suggestion text

  4. Press Enter to insert

See AI query suggestion for more details.

Fix an error when the query fails

If the SQL fails, use AI to explain and repair it in one pass.

  1. Click Explain and Fix

  2. Apply the fix

For the flow, see AI error explanation.

Describe a database object when you need context

Ask AI to describe a table, view, or other object in plain language. The result opens in AI chat.

  1. Open Database Navigator or Properties editor
  2. Right-click the object, Describe database object

  3. Review the description in AI chat, and ask follow-ups

For supported objects and flow, see Describe database object.