In DBeaver 25.0, there is a faster way to generate queries using AI. Simply enter the @ai command in the SQL Editor, type your prompt, and execute it.
What if writing SQL was as easy as giving a prompt to a computer? In DBeaver 25.0, that vision is now reality. DBeaver is a popular open-source database client – a “free cross-platform database tool for developers, database administrators, analysts, and everyone working with data”. Dbeaver IO’s latest 25.0 release adds a very cool AI twist. Now the SQL Editor has a new AI command: just type @ai followed by a plain-English description of the data you need, and hit Execute. DBeaver then translates your prompt into SQL and runs it, so you can focus on asking questions instead of memorizing syntax.
AI Command in Action
The new @ai feature works right in your SQL Editor: start a line with @ai, type in your request in everyday language (for example, @ai list all customers from Canada), and run it. DBeaver will parse your prompt, call the AI model, and instantly show a completed SQL query with results. For example, DBeaver’s documentation shows how @ai show films in which Grace Mostel starred automatically produces the correct SELECT statement for you. In practice, the AI handles all the SQL details – joins, filters, columns and all – so you don’t have to second-guess table names or syntax.
How to Use @ai
- Enable AI in DBeaver: In the PRO edition the AI assistant is built-in. In the free Community edition, install the official AI support extension and add your AI (OpenAI) key in Preferences.
- Type your prompt: In the SQL Editor, begin a query with @ai and describe what you want (e.g. @ai total sales by region for 2024).
- Execute the query: Run it just like any SQL. The first time, DBeaver will ask permission to share your database’s table and column names with the AI (no actual data is sent). Once confirmed, the AI generates and executes the query.
- Review and refine: The generated SQL appears in the editor and the results in the grid. You can tweak the SQL if needed or simply copy the result.
The whole process is smooth and fast. You don’t even need to remember commas or join syntax – the AI does it for you. As DBeaver’s own notes explain: “Simply configure the AI engine, describe in the SQL Editor what you need in plain language, and get a ready-to-use query instantly”.
Why Developers and Analysts Will Love It
- Plain-English queries: No more wrestling with tricky syntax or remembering every table name. Just describe what you need, and the AI writes the query. This can dramatically speed up routine tasks.
- Faster workflow: What might take multiple edits and StackOverflow searches can now be done in one step. Analysts can prototype and iterate on data questions far more quickly.
- Learn as you go: Seeing how the AI translates your request into SQL is a great learning aid. It’s like having a SQL tutor or pair programmer at your side. You can study the generated query and learn better patterns.
- Built into an open-source tool: Best of all, this power comes inside a free, community tool. DBeaver’s integration of AI makes advanced query-writing available to everyone, not just enterprise users.
DBeaver’s 25.0 release really puts a faster, AI-driven workflow into the hands of developers and data pros. With a simple @ai command, you can turn plain English into SQL lightning-fast – a game-changer for everyday database work. Whether you’re cranking out reports or just learning SQL, this new feature is sure to bring a big smile. After all, having an AI sidekick that handles the boilerplate frees you to focus on insights. Give DBeaver 25.0 a spin and see how easy querying can be!