I use DBeaver for my main IDE to query multiple databases. When I query a table, it automatically generates a long select statement with all columns in one line.
When I am making more complex queries, this gets very cumbersome to work with and read. I would like to view the select values on separate lines rather than one long string.
Is there an easy way (perhaps by using Notepad++ or Sublime Text) to break up the query (with line breaks after the commas)?
For example,
select name, address, city, state, country, zip_code, birthday, membership_type
from customers
to
select
name,
address,
city,
state,
country,
zip_code,
birthday,
membership_type
from customers
Select Edit -> SQL Formatter -> Format Current Query (or press F12). Only the current query would be formatted. -- Format Selected Query: To format a selected query(s) in set of query(s), select the query(s) to be formatted. Select Edit -> SQL Formatter -> Format Selected Query (or press Ctrl+F12).
To change the data format settings use the option Window -> Preferences in main menu. In the Preferences dialog box go to Editors -> Data Editor -> Data Formats. Or, in the Database Navigator right-click a connection and select Edit Connection menu option.
How do you format your SQL code in SQL Developer? You can press CTRL+F7 (on Windows) to format the SQL code in your current Code Editor window to update the formatting of the code based on any format changes you have made.
SQL Formatter helps to format SQL code data and it helps the developer easy to read the SQL. This tool helps uses to beautify large SELECT statements and make it easy to read.
Press Ctrl+Shift+F (or select Format>Format SQL in DQL Editor context menu) The query will be formated according default Sql workbench/j formatter settings. Please note, DBeaver doesn't apply custom settings of Sql workbench/j formatter kseniiaguzeeva added wait for response and removed wait for review labels on Sep 10, 2020
It can be found here: SQLinForm SQL Formatter and has 100+ formatting options with code folding and color formatting. There is also a free plugin available. Select a query to be formatted and Ctrl + shift + F does the work. I am using DBeaver 6.3.0
The SQL Formatter for DBeaver is part of the Windows App. Download and unzip the Windows App and you are ready for DBeaver. Add into DBeaver a command line as explained below The SQLinForm SQL Formatter can be integrated as external Formatter in DBeaver
there is another plugin for formatting SQL in Notepad++. It can be found here: SQLinForm SQL Formatter and has 100+ formatting options with code folding and color formatting. There is also a free plugin available. Select a query to be formatted and Ctrl + shift + F does the work. I am using DBeaver 6.3.0
DBeaver has a shortcut for this purpose. In SQL Editor:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With