SQL Formatting
To format an SQL text, select it and press Ctrl+Shift+F or right-click the selected text and click Format -> Format SQL on the context menu.
To format a script to upper or lower case, highlight the SQL text, then right-click it and click Format -> To Upper Case / To Lower Case, respectively, on the context menu.
To comment out an SQL line, press Ctrl+/ or right-click the line and click Format -> Toggle Line Comment on the context menu. To uncomment a commented line, manually remove the commenting syntax, or press the same button combination, or right-click the line and click the same item on the context menu.
To comment out a block of text, select the text, then press Ctrl+Shift+/ or right-click it and click Format -> Toggle Block Comment on the context menu. To uncomment a commented block of text, you can either manually remove the commenting syntax or select the same block of text, right-click it and click the same item on the context menu or press the same button combination.
To trim spaces (leading and trailing) SQL text right-click the selected text or end of string and click Format -> Trim spaces on the context menu.
You can choose a part of the text
or put the cursor at the end of the row you want to trim
You will get the following result:
Or you can choose a part of the text from many lines
Then each of the selected rows will trim, and the final result will be like this:
-
Views
-
Search
-
Projects
- Sample Database
-
Database Connections
- Edit Connection
- Invalidate/Reconnect to Database
- Disconnect from Database
- Change current user password
- Advanced settings
- Cloud configuration settings
- Local Client Configuration
- Connection Types
- Configure Connection Initialization Settings
- Tableau integration
- Transactions
- Drivers
- Tasks
- Cloud Explorer
- Cloud Storage
- Classic
- Cloud
- Changing interface language
- DBeaver extensions - Office, Debugger, SVG
- Installing extensions - Themes, version control, etc
- User Interface Themes
- Command Line
- Reset UI settings
- Reset workspace
- Troubleshooting system issues
- Posting issues
- Log files
- JDBC trace
- Thread dump
- Managing connections
- Managing variables
- Managing drivers
- Managing preferences
- Managing restrictions
- Windows Silent Install
- Snap installation