gpt4 book ai didi

sql - 如何在 DBeaver 中漂亮地格式化我的 SQL 查询?

转载 作者:行者123 更新时间:2023-12-01 16:15:00 34 4
gpt4 key购买 nike

我使用 DBeaver 作为我的主 IDE 来查询多个数据库。当我查询一个表时,它会自动生成一个长的 select 语句,其中所有列都在一行中。

当我进行更复杂的查询时,使用和阅读这会变得非常麻烦。我想在单独的行而不是一个长字符串上查看选择值。

有没有一种简单的方法(也许通过使用 Notepad++ 或 Sublime Text)来分解查询(在逗号后换行)?

例如,

select name, address, city, state, country, zip_code, birthday, membership_type 
from customers

select
name,
address,
city,
state,
country,
zip_code,
birthday,
membership_type
from customers

最佳答案

DBeaver 有一个用于此目的的快捷方式。在 SQL 编辑器中: enter image description here

关于sql - 如何在 DBeaver 中漂亮地格式化我的 SQL 查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46429209/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com