How to align query in sqldeveloper 4.0?

大憨熊 提交于 2019-12-03 11:27:49

问题


I have query written in sqldeveloper but I don't know how to align or format the query in neat order.

P.S: I don't know whether this question can be asked here. Kindly answer if any knows the answer here.


回答1:


I have used Ctrl + f7 to format or align my query in sqldeveloper 4.7 with reference to the above comment from leo.




回答2:


Just right click, select FORMAT option, or, use Ctrl + f7 shortcut to format. If you have not set your own formatting rules, then it would take the default formatting.

If you want to configure your own formatting, not many options though, go to Tools > Preferences > Code Editor > Display

You can also save it as your default format. So that even if you reinstall SQL Developer, you can always point to the format file you saved earlier in your local machine.




回答3:


I had the same issue.

The steps I followed were:

Goto Tools > Preferences > SQL Formatter

Then Click Export and save the xml file. Now make changes however you like. Eg- I wanted 4 commas per line, so changed all 1 to 4 and used Ctrl + f7 to format.

Works well.




回答4:


right click on the query and then select "format"




回答5:


For windows, CTRL + F7

For Mac, there is nothing from the OOTB. However, you can setup custom shortcut keys. Preference -> Shortcut Keys. Search for 'format' and assign the new shortcut key.



来源:https://stackoverflow.com/questions/26888642/how-to-align-query-in-sqldeveloper-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!