6 SQL Formatting
dbeaver-devops edited this page 2025-11-26 13:38:55 +00:00

Table of contents

To format SQL text:

  1. Select the SQL text you wish to format.

  2. Press Ctrl+Shift+F or click on the Format SQL Script button located on the left toolbar.

Commenting SQL lines

To manage comments in SQL scripts:

  • To comment out an SQL line:

    1. Place your cursor on the line you want to comment.
    2. Press Ctrl+/ or CMD+/ for macOS.
  • To uncomment a commented line:

    1. Place your cursor on the commented line.
    2. Press Ctrl+/ (CMD+/ for macOS) again to remove the commenting syntax.