Bert Wagner shows off vertical selection in SSMS (using the Alt key):
Sometimes when writing an ad hoc query you might want to take the results of one query and put them into an IN() statement of another query.
Sure, you can write a subquery to put into your IN() statement…but that’s too much work for a one-time use disposable query.
What you can do instead is:
-
Copy your values of interest
-
Paste them into your IN() statement
-
Hold down the ALT key while dragging the mouse down in front of all of your pasted values
-
Type a comma (see video above for an easier demonstration).
For SSMS speedrunning strats, you can also hold down ALT + SHIFT and use your keyboard arrow keys instead of using the mouse.