Formatting SQL statements in Java files in the Java editor

While you are writing and editing SQL statements in Java files in the Java editor, you can format one or all of the SQL statements to improve their readability.

Before you begin

Ensure your project meets the following requirements:
  • The Java project that contains the Java file that you are editing must have pureQuery support enabled.
  • The SQL statements that you want to format must have pureQuery annotation.

About this task

If a file that contains SQL statements is not open in the Java editor, you can format the .java file from the Package Explorer.

Procedure

To format SQL statements in the Java editor:

Results

The individual SQL statement or all of the SQL statements in the Java editor are formatted.

Feedback