Skip to content

SQL Assist and Auto Complete

The SQL Assist feature provides auto-completion of database object names and SQL commands, and other keywords in queries.

How to use SQL Assist

  1. Start typing an SQL keyword or object name in the editor
  2. Press Ctrl+Space to see completion suggestions

    • To complete based on the last entered identifier, either double-click the suggestion or press Ctrl+Shift+Space
    • After an asterisk (*) in queries like SELECT * FROM tableName, press Ctrl+Space to expand into all columns
    • You can also right-click in the query and choose SQL Assist from the context menu

Quick Fix

Also, you can use SQL Assist to fix errors. When the editor detects a problem (for example, an invalid column reference), it shows an annotation next to the SQL code.

Note

AI assistant must be activated first. Learn how to enable it.

  1. Hover over the annotation to open Quick Fix, or press Ctrl+1

  2. Click Explain and Fix

  3. AI Chat opens with a detailed explanation of the error and a suggested corrected query.

Completion engines

DBeaver offers three SQL completion engines. You can switch between them in Window -> Preferences -> Editor -> SQL Editor -> Code Completion.

  • Semantic (recommended) - provides the most accurate and context-aware suggestions by analyzing the entire SQL structure and lexical scopes. It improves completion accuracy but may not work correctly with certain database-specific syntax. It relies on a generalized SQL grammar and requires Enable semantic analysis and Read database table/columns for semantic analysis to be enabled in Code Editor settings.
  • Legacy - a more straightforward completion engine that suggests SQL elements based only on their position in the query. This can sometimes lead to incorrect or incomplete suggestions, especially in subqueries.
  • Combined - merges suggestions from Semantic and Legacy engines. It enhances completion coverage by including suggestions not yet available in Semantic. However, since both engines run simultaneously, it may consume more resources, though this is usually noticeable only in very large queries.

Note

The Semantic engine is actively being improved, but if you encounter issues, switching to Legacy may provide more stable behavior. We still recommend using Semantic for the best overall experience.

Hippie Engine

Hippie Engine provides autocompletion based on information from the current script file. It scans files looking for words and adds proposals based on similarity with the given string.

It can be toggled on or off in the Code Completion preferences.

Customize

You can customize your SQL Assist and Auto Complete by navigating to Window -> Preferences -> Editor -> SQL Editor -> Code Completion, optimizing the performance of the auto-completion feature.