Block Text Selection in SSMS Query Editor Window

To use block text selection in SQL Server Management Studio (SSMS) Query Editor Window, press and hold the Alt keyboard key and use the mouse to select block of text, or use Shift+Alt+Arrow keys to make the selection.

Block selection can be useful for editing and formatting multiple rows of code.

Here is an example what would the selection look like:

block_text_selection_example

Now you can edit the whole selection. For example you can delete the whole text block. If you type 'OR', it will replace the 'AND' operator in all selected rows:

block_text_selection_example_edit

To insert text into multiple lines, press and hold the Alt keyboard key and use the mouse to select rows, or use Shift+Alt+'Down Arrow' keys:

block_text_selection_example_insert

...and just type or paste text that you want to insert into multiple lines.

If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">