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 a query to be formatted and Ctrl + shift + F does the work. I am using DBeaver 6.3.0
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.
In SublimeText I assume you have already installed Package Control ? If not do so as soon as you can, it is a vital tool.
From Package Control there are a number of options to do what you want to do. Here are some options
I would start with SqlBeautifier and then try others to find which one suits your taste best.
使用反引号 ` 代替引号 " 或 '
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.