Reputation: 10959
I have a statement in my Java code like so
String sql = "SELECT COL1, COL2, COL3, " +
" COL4, COL5, COL6, COL7 " +
" FROM TABLE T";
Is there an easy way to convert/format this as a SQL query (like below) in Datagrip. Similar to what SQLWorkbench does with a "Clean Java Code" by pressing Alt+L?
SELECT COL1, COL2, COL3,
COL4, COL5, COL6, COL7
FROM TABLE T
Upvotes: 3
Views: 3071
Reputation: 10345
Alt+Enter
Copy string concatenation text to clipboard
Upvotes: 2
Reputation: 1464
Firstly, you need to inject proper SQL dialect
select dialect
select specific dialect
successful injection
and then edit SQL fragment
or call Execute
(Ctrl+Enter) from context menu.
Upvotes: 0