DBeaver Documentation

DOWNLOAD pdf

SQL Assist and Auto Complete

Overview

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

To perform some object name auto-complete, press Ctrl+Space or right-click the desired location in the query and click SQL Assist on the context menu. DBeaver searches for objects in a database by their names and/or descriptions.

When you start typing an SQL keyword in a statement, DBeaver offers auto-complete options as well.
Another auto-complete function is that it searches for the last entered identifier - type the first letter and press Ctrl+Shift+Space.

You can also press Ctrl+Space after the asterisk in the query similar to SELECT * FROM tableName or similar to INSERT INTO tableName (*) (brackets are important) (you can use ()[]{} brackets) - the asterisk will be replaced with a list of all the table columns.

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.