To format 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, 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.