DBeaver Documentation (2024)

Table of contents

        • Getting started
        • SQL Editor overview
          • Script panel
            • Spelling
            • Hyperlinks
            • Highlighting
          • Toolbar
          • Results Panel
            • Multiple results in one tab
        • Additional features
          • Active Database
          • Layout Adjustment
          • Outline
          • Error indication
        • Features summary

With the SQL Editor in DBeaver, you can write and execute multiple SQL scripts within a single database connection, savethem as files, and reuse them later.

Getting started

To start working with the SQL Editor, you have several options:

  1. Via Database Navigator:

    • Navigate to your desired database connection in the Database Navigator view.
    • Press F4 or go to SQL Editor -> Open SQL script from the main menu, or right-click on theconnection and choose Open SQL script from the context menu.
    • A Choose SQL Script window appears. Click any script to open it in a new tab.
  2. Open Recent SQL script:

    • Right-click on your database connection and select SQL Editor -> Recent SQL script from the context menu or go to SQLEditor -> Recent SQL script from the main menu. Alternatively use the Ctrl+Enter shortcut in the Database Navigator view.
    • A Choose SQL Script window appears. Click any script to open it in a new tab.
  3. Create a New SQL Script:

    • Navigate to SQL Editor -> New SQL Editor on the main menu.
    • Press F3 and click New Script in the Choose SQL Script window.

Note: SQL Editor for a connection is different from SQL console for a table or view. Unlike the console, it can savescripts and changes made to them.

You can see all your saved SQL scripts in the Project Explorer view in the Scripts folder.

SQL Editor overview

The SQL Editor contains the Script panel, the Toolbar, and the Result panel.

DBeaver Documentation (1)

Tip: You can open the SQL editor preferences by pressing Alt+Enter or right-click and navigate toPreferences.

Script panel

The Script Panel is the primary area where you can write, edit, and manage your SQL scripts. It provides basic textediting features with the added benefits of specialized functionalities tailored for SQL development:

Spelling

The panel includes a spelling checker to identify and highlight misspelled words, assisting you inmaintaining the quality of your scripts. For more information check out our article.

Hyperlinks

You can press and hold Ctrl and at the same time move the mouse over the SQL text. If DBeaver recognizes someidentifier as a table/view name, it presents it as a hyperlink. You can click the hyperlink to open this object`seditor:

DBeaver Documentation (2)

Highlighting

DBeaver uses SQL syntax highlighting which depends on the database associated with the script. Different databases havedifferent sets of reserved keywords and system functions. For more information, see the relevant section on highlightingsettings in our article on SQL Code Editor.

Toolbar

The toolbar is customizable and contains buttons for commonly used commands. For more information on customization,see our article on toolbar customization.

Results Panel

The results panel displays tabs with results in various formats. The tabs resulting from script execution representinstances of the Data Editor. You can create, edit and execute SQL scripts in the script panel andthen see the results in the result tabs.

Multiple results in one tab

You can view and manage multiple query results within a single tab.

DBeaver Documentation (3)

To use the Multiple results feature in the SQL Editor, follow these steps:

  1. Add Toolbar Item: Add the Toggle execution result orientation DBeaver Documentation (4) to the SQL Editor toolbar.

    Alternatively:

    • Right-click in the SQL Editor window and navigate to Execute -> Toggle execution result orientation.
    • Navigate to SQL Editor -> Toggle execution result orientation.
  2. Toggle: Click the toolbar item to activate multiple query results view.

  3. View results:

    • To view multiple results in a single tab, execute queries using the Execute SQL Script button DBeaver Documentation (5).
    • You can collapse some result sets according to your preference by clicking the arrow button DBeaver Documentation (6).

Important: When using two or more queries in parallel, exercise caution as this may lead to client UI freeze, highdatabase server load, or transaction deadlock.

Additional featuresActive Database

You can change the connection associated with the current SQL editor or change the active database/schema, at the sametime retaining the SQL text.
To change the connection, press Ctrl+9 or click the Active datasource box on DBeaver`s main toolbar:

DBeaver Documentation (7)

The Select Data Source dialog box opens. In the tree of connections, click the required connection and then clickSelect. To disassociate the SQL Editor with any connection, click None:

DBeaver Documentation (8)

To change the active schema, press Ctrl+0 or click the Active Catalog/Schema box in DBeaver`s maintoolbar:

DBeaver Documentation (9)

The Choose catalog/schema dialog box opens. In the list of schemas, double-click the required schema:

DBeaver Documentation (10)

If there are many schemas, and they do not fit in the dialog box use the search field DBeaver Documentation (11) to find the schema.

To configure the set of columns to be visible for each schema in the dialog box, click the Configure columnsbutton DBeaver Documentation (12).

Tip: You can easily associate the SQL Editor with the connection that is currently in focus in the Database Navigator (thefocus can be on any object of the connection - a table, a folder, etc.) - click the Link with editor DBeaver Documentation (13)or use the shortcut Ctrl+Shift+,.

Layout Adjustment

You can modify the layout of the SQL Editor by showing/hiding the results panel and changing the horizontal/verticalposition of the panes.

  • To toggle (hide/show) the results panel, press CTRL+6 or right-click anywhere in the script pane and, onthe context menu, click Layout -> Toggle results panel.
  • To maximize the results panel, press CTRL+Shift+T, or double-click the results tab name, or right-clickanywhere in the script panel and, on the context menu, click Layout -> Maximize results panel.
  • To switch between the script panel and the results pane, press Ctrl+Alt+T or right-click anywhere in the scriptpanel and, on the context menu, click Layout -> Switch active panel.

To position both panels horizontally, right-click anywhere in the script panel and, on the context menu, clickLayout -> Horizontal.
To position both panels vertically, right-click anywhere in the script panel and, on the context menu, click Layout ->Vertical.

Outline

You can use the Outline feature in the SQL Editor to get a structured view of your SQL query.

DBeaver Documentation (14)

Here's how you can access the Outline:

  • Use the shortcut: Alt+Shift+Q, O (on macOS use ⌥⌘Q O).
  • Click on the Toggle Outline button DBeaver Documentation (15) in the SQL Editor bottom toolbar.
  • Select Panels -> Toggle outline from the Script panel.
  • Select SQL Editor -> Panels -> Toggle outline from Menu bar.

When you open the Outline, it shows a tree structure of your SQL query. This representation reflects the components ofyour SQL query and is beneficial for analyzing and moving through large queries. The relationship between the Outlineand SQL Editor is interactive:

  • The tree selection in the Outline automatically follows the cursor movement in the SQL Editor. This synchronizationhelps you identify the specific section of the query you are editing within its overall structure.
  • Alternatively, clicking an item in the Outline tree will highlight the corresponding fragment in the SQL Editor,facilitating swift navigation to different parts of your SQL query.

Error indication

The SQL Editor indicates errors during the execution of an incorrect query by displaying an erroricon DBeaver Documentation (16) to the left of the query text. Hovering over this icon reveals a tooltip.

  • Tooltip: A tooltip will show a detailed list of errors.
  • Error list: Moving the mouse over an error in the list will highlight it directly in the query.
  • Error types: The SQL Editor detects and displays server issues, semantic errors, and spelling mistakes.

Note: Semantic errors are displayed only when the Enable semantic analysis setting is activated and thedatabase in use is relational. For more information,see Query analysis settings.

DBeaver Documentation (17)

Features summary

The SQL Editor offers a variety of advanced features to enhance your scripting experience.

Feature Description More Info
SQL Templates Pre-defined SQL code snippets for quick insertion. SQL Templates
SQL Assist and Auto-Complete Helps complete SQL queries by suggesting options. SQL Assist and Auto-Complete
AI SQL Assistance Uses AI to suggest optimizations and best practices. AI SQL Assistance (ChatGPT)
SQL Formatting Automatically formats SQL queries to improve readability. SQL Formatting
SQL Execution Provides various options to execute SQL queries. SQL Execution
SQL Terminal A terminal interface for executing SQL commands. SQL Terminal
Variables Manage variables within your SQL queries. Variables Panel
Pre-configured variables
Query Execution Plan Visualize the execution plan of your SQL queries. Query Execution Plan
Visual Query Builder A graphical interface for building SQL queries. Visual Query Builder
Script Management Manage multiple SQL scripts within a single editor. Script Management
Client-Side Commands Execute client-side commands within the editor. Client-Side Commands
DBeaver Documentation (2024)

FAQs

What is DBeaver used for? ›

DBeaver Community is a free cross-platform database tool for developers, database administrators, analysts, and everyone working with data. It supports all popular SQL databases like MySQL, MariaDB, PostgreSQL, SQLite, Apache Family, and more.

Is DBeaver easy to use? ›

DBeaver is an open source database Management tool that supports various databases like MySQL, PostgreSQL, SQLite and more. . It provides a user-friendly interface for executive SQL queries, managing database structure and visualizing data. It has features like data transfer, schema compare, and data modelling.

Is DBeaver better than MySQL workbench? ›

DBeaver is better suited for those who work with different database types or will use more databases than MySQL in the near future. This tool has a wide range of features for SQL scripting, data visualization, data management, and data transfer, which can play a key role even for those who use only MySQL.

What query language does DBeaver use? ›

DBeaver uses SQL syntax highlighting which depends on the database associated with the script. Different databases have different sets of reserved keywords and system functions.

How to use DBeaver effectively? ›

Basic operations
  1. First, in the Database Navigator, navigate to the level where your new object should be created. ...
  2. Right-click on the node (such as a database, schema, table, etc.) ...
  3. From the submenu, choose the type of object you want to create (e.g., Database, Schema, Table, Column, View, Foreign Key, Index, etc.).

What is better than DBeaver? ›

Other important factors to consider when researching alternatives to DBeaver include features and user interface. The best overall DBeaver alternative is DbVisualizer. Other similar apps like DBeaver are Navicat Premium, TablePlus, Microsoft SQL Server, and Sequel Pro.

What is the difference between DBeaver and HeidiSQL? ›

Cross-platform Support: DBeaver is compatible with multiple operating systems including Windows, macOS, and Linux, allowing users to work with their preferred platform. In contrast, HeidiSQL is primarily designed for Windows and does not have official support for other operating systems.

What is the difference between DBeaver and SQL Server? ›

DBeaver offers comprehensive data management tools designed to help teams explore, process, and administrate SQL, NoSQL, and cloud data sources. DBeaver is available commercially as DBeaver PRO and for free as DBeaver Community. Microsoft SQL Server is a relational database.

What is the difference between DBeaver and pgAdmin? ›

Customization and Extensibility: DBeaver provides a high level of customization and extensibility, allowing users to write custom plugins and scripts to enhance its functionality. pgAdmin, on the other hand, has limited customization options and relies more on the PostgreSQL ecosystem for additional functionality.

Is DBeaver free or paid? ›

DBeaver is free and open source universal database tool for developers and database administrators.

What companies use DBeaver? ›

Who uses DBeaver?
CompanyWebsiteCountry
Mohawk Industries, Inc.mohawkind.comUnited States
Earnest Operations LLCmeetearnest.comUnited States
PicPaypicpay.comBrazil
EPAM Systems Incepam.comUnited States
1 more row

Who owns DBeaver? ›

DBeaver was born as a hobby project of our founder Serge Rider.

Why choose DBeaver? ›

It is free and open-source (ASL). It is multiplatform. It is based on opensource framework and allows writing of various extensions (plugins). It supports any database having a JDBC driver.

What is the difference between DBeaver and PostgreSQL? ›

DBeaver is available commercially as DBeaver PRO and for free as DBeaver Community. PostgreSQL (alternately Postgres) is a free and open source object-relational database system boasting over 30 years of active development, reliability, feature robustness, and performance.

How do I use DBeaver database? ›

Open the DBeaver application and in the Database menu, select the New Database Connection option. In the 'Connect to a database' window, select ODBC and click Next. In the Database/Schema field, enter the DSN name (CData SQL Server Source by default). It will be automatically added to the JDBC URL as well.

Top Articles
Raising Kids That Understand Money Management - Forgetful Momma
Gold & Silver Bullion | The Royal Mint
Brady Hughes Justified
Limp Home Mode Maximum Derate
25X11X10 Atv Tires Tractor Supply
Practical Magic 123Movies
Is Csl Plasma Open On 4Th Of July
Marist Dining Hall Menu
Buckaroo Blog
Milk And Mocha GIFs | GIFDB.com
Epaper Pudari
Azeroth Pilot Reloaded - Addons - World of Warcraft
Qhc Learning
Connexus Outage Map
Nebraska Furniture Tables
Craigslist Blackshear Ga
Bridge.trihealth
Missed Connections Inland Empire
Vigoro Mulch Safe For Dogs
Heart and Vascular Clinic in Monticello - North Memorial Health
Aerocareusa Hmebillpay Com
Www.patientnotebook/Atic
Talkstreamlive
Hefkervelt Blog
Tuw Academic Calendar
Cowboy Pozisyon
Wolfwalkers 123Movies
Florence Y'alls Standings
10 Best Quotes From Venom (2018)
Nikki Catsouras: The Tragic Story Behind The Face And Body Images
ATM, 3813 N Woodlawn Blvd, Wichita, KS 67220, US - MapQuest
Rlcraft Toolbelt
L'alternativa - co*cktail Bar On The Pier
Los Amigos Taquería Kalona Menu
Tra.mypatients Folio
Kstate Qualtrics
Hotels Near New Life Plastic Surgery
Vanessa West Tripod Jeffrey Dahmer
Dollar Tree's 1,000 store closure tells the perils of poor acquisitions
Restored Republic May 14 2023
Wasmo Link Telegram
Dinar Detectives Cracking the Code of the Iraqi Dinar Market
Dwc Qme Database
Unitedhealthcare Community Plan Eye Doctors
Unveiling Gali_gool Leaks: Discoveries And Insights
boston furniture "patio" - craigslist
Victoria Vesce Playboy
Terrell Buckley Net Worth
Mikayla Campinos Alive Or Dead
How To Connect To Rutgers Wifi
7 Sites to Identify the Owner of a Phone Number
Dr Seuss Star Bellied Sneetches Pdf
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 6057

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.