formatting PLSQL developer
Solution 1
I am using version 12.0.7.
For this version, function name is not Edit / PL/SQL Beautifier
It is Tools / Source / PL/SQL Beautifier
It took some time for me to find it. I hope this help others.
Solution 2
PL/SQL Developer does not have a default keyboard shortcut to launch the PL/SQL Beautifier but it is easy to configure one.
Open Tools --> Preferences, click on "Key Configuration", find the item "Edit / PL/SQL Beautifier", double-click on the empty space, click whatever keys you want to use for the shortcut, then click OK:
You can also enable the PL/SQL Beautifier to run automatically:
But be careful before you become too dependent on the code beautifier. They generally do not work well for Oracle SQL and PL/SQL. PL/SQL has a huge grammar and no code beautifier in existence can handle all types of code well. Also, dynamic code is much more important in PL/SQL than in other languages; beautifiers won't help with dynamic code so you'll likely need to manually format some code anyway.
Solution 3
You must select your query and then click PL/SQL Beautifier button.
Solution 4
Select your code and Use Ctrl-F7 on SQL Developer and PLSQL Developer as well.
Related videos on Youtube
mohammad_1m2
Updated on March 25, 2020Comments
-
mohammad_1m2 over 4 years
Is there any shortcut for formatting the query in
plsql developer
? I want to format below query:SELECT * FROM T1, T2 WHERE T1.ID = T2.ID
like:
select * from T1, T2 WHERE T1.ID = T2.ID
-
APC almost 7 yearsYes, PL/SQL Developer has a PL/SQL beautifier, which does SQL too. Find out more. Be aware that it can't handle some rare SQL constructs.
-
William Robertson almost 7 yearsI'm not sure it can match your example exactly. For one thing, keywords can be set to either uppercase or lowercase, but not uppercase for
WHERE
and lowercase forselect
andfrom
, if that is your rule.
-
-
Mookayama almost 6 yearsI am using sql developer mac os version 18.1.0.0.5 see attach export file. I dont see beautify for my short cut key mapping is this a plug in I need to install ?? [docs.google.com/document/d/…