-
Notifications
You must be signed in to change notification settings - Fork 4.3k
AI command
The AI command lets you run natural language requests directly in the SQL Editor. Just type @ai with your question,
and DBeaver will generate and execute the SQL for you.
To use the AI command:
-
Open the SQL Editor.
-
Type your request using the
@aicommand.Example:
@ai show all customers with invoices in the last month -
Execute the AI command. The results will appear in the Result panel.
AI commands can execute queries directly against the database. To control how this happens, configure the AI query execution settings.
By default, SELECT queries execute immediately, while modification and schema changes require confirmation.
You can adjust this behavior in Window -> Preferences -> AI -> Configuration -> AI query execution.
If confirmation is enabled, running an @ai command opens a dialog before execution.

How it works:
- When you run the
@ai ...command, the dialog shows a warning about the type of query (for example, schema modification). - In the confirmation dialog, click Show Query to review the generated SQL.
- If the query looks correct, click Yes to execute. Otherwise, click No to cancel and adjust your request.
Warning: If confirmations are disabled and autocommit is on, AI commands can change data immediately. Enable Show confirmation for modify and schema queries, or use Disable autocommit to stay safe.
- Getting started
- DBeaver configuration
-
Security
- Connection settings
- Databases support
- Classic
- Cloud
- Embedded
- File drivers
- Graph
- Database Navigator
- Data Editor
- SQL Editor
- Entity relation diagrams (ERD)
- Cloud services
- AI Smart Assistance
- Data transfer and schema compare
- Task management
- Integrated tools
- Administration
- DBeaver Editions
- Standalone
- Cloud-hosted
- FAQ
- Development