Hi experts,
I would like to know some keyboard shortcuts and clever formatting on PL/SQL codes in SQL Developer. Please help me out with some hints for this. Thanks in advance.
Software/Hardware used:
ASKED:
February 19, 2009 5:49 AM
UPDATED:
April 18, 2013 2:50 PM
HI,
I need to understand the clever ways to format the PL/SQL ,not shortcuts …
Hello ,
I found sqlinform a online version for formatting.
But is there direct means to get it properly done in sql developer itself
pls share ur thoughts
I tried sqlinform, and I found it pretty similar to the sql formatter in Sql Developer (ver 1.5 or above). What exactly would you want to be able to do in Sql Developer that is possible in sqlinform but not in sql Developer ?
BEGIN .. END blocks and IF .. then checks indentation within the block..
I’m using version 1.5.3 and it does that, and much more.
You just need to select the desired code, and press Ctrl+F7 (this is the default shortcut), and it will automatically apply format including alignment and indentation, line breaks, white spaces, and others.
The formatter options are under Tools->preferences->Database->Sql Formatter.
If you are using an older version, I would recommend to download the latest.
Download Sql Developer 1.5.3 here.
thanks yes even i am using 1.5.3,anyhow will check my formatting preference to have good formatting of my code
thanks once again.
Use Tools->preferences->Database->Sql Formatter to customize how the formatter should format your code. The default formatting of SQL Developer is quite awkward, you can set it to your preference.
Select the code block that you want to format, press F7, done
@Carlosdl -> Thank you
Help, I’m using it, but it put spaces between for example a htp.p text, making my code huge! How do I set it up to do not put line breakes between text lines?
silvasofia:Go to “Tools”->”Preferences”->”Database”->”SQL Formatter”->”Oracle Formatting” and click the “Edit” button, then expand the “Line Breaks” item and make sure all checkboxes are unchecked. Then click Ok twice, and try again.