Set the sql writing format of plsql developer and beautify sql

Setting method:

PL/SQL Developer -> tools -> Preferences -> plsql beautifier -> rules file

, click edit, in the opened window, modify each item in turn, after modification, click save. You can choose the save location by yourself. The location

I save is in the Preferences folder of the installation directory of PLSQL Developer, and you can name it arbitrarily, such as myname.br.

Then, in the input box of the rules file, click the button of the folder and select the newly created one. document.



Finally click apply. In this way, a new rule file in sql format is created.



Use :

Select the SQL statement to be formatted, and then click the PL/SQL beautifier button on the toolbar (there is a green tick button on the file).

The sql statement is formatted as its own format.

Create myname.br The following is the content of myname.br


Version=1
RightMargin=90
Indent=4
UseTabCharacter=FALSE
TabCharacterSize=4
AlignDeclarationGroups=TRUE
AlignAssignmentGroups=TRUE
KeywordCase=1
IdentifierCase=1
UseSpecialCase=TRUE
ItemList.Format=1
ItemList.Align=TRUE
ItemList.CommaAfter=TRUE
ItemList.AtLeftMargin=FALSE
EmptyLines=1
ThenOnNewLine=FALSE
LoopOnNewLine=FALSE
DML.LeftAlignKeywords=FALSE
DML.LeftAlignItems=FALSE
DML.OnOneLineIfPossible=TRUE
DML.WhereSplitAndOr=TRUE
DML.WhereAndOrAfterExpression=FALSE
DML.WhereAndOrUnderWhere=TRUE
DML.InsertItemList.Format=1
DML.InsertItemList.Align=FALSE
DML.InsertItemList.CommaAfter=TRUE
DML.InsertItemList.AtLeftMargin=FALSE
DML.SelectItemList.Format=1
DML.SelectItemList.Align=TRUE
DML.SelectItemList.CommaAfter=TRUE
DML.SelectItemList.AtLeftMargin=FALSE
DML.UpdateItemList.Format=0
DML.UpdateItemList.Align=FALSE
DML.UpdateItemList.CommaAfter=FALSE
DML.UpdateItemList.AtLeftMargin=FALSE
ParameterDeclarationList.Format=1
ParameterDeclarationList.Align=TRUE
ParameterDeclarationList.CommaAfter=TRUE
ParameterDeclarationList.AtLeftMargin=FALSE
RecordFieldList.Format=1
RecordFieldList.Align=TRUE
RecordFieldList.CommaAfter=TRUE
RecordFieldList.AtLeftMargin=FALSE
SplitAndOr = FALSE
AndOrAfterExpression=FALSE
[SpecialCase]



Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326721017&siteId=291194637