Is there a way in SQL SERVER MANAGEMENT STUDIO to highlight all usage of variables when we click on a variable name?
4 Answers
It might not work in all cases, but I find that using the F2
button, which on my machine is mapped to 'View.EditLabel'. It allows me to highlight all of one 'type' things like aliases, variable names and others. Not perfect, but fits my purpose.
I still stand by the fact that it might not be perfect, but it does do what the original poster asked. If you want to see what this command is mapped to see the Options windows.
-
1
-
I also have F2 globally mapped to 'View.EditLabel' by default. Still, when I select text and press F2 I get no highlighting. Nov 24, 2016 at 11:16
-
It does not work for free text. As I mentioned above it works for things like aliases and variables. Nov 24, 2016 at 17:12
-
@PriteshAcharya Go to the Tools menu and click Options. Under Environment, click on Keyboard. In the text box under "Show commands containing" type in View.EditLabel and you will see what the command is mapped to. Nov 24, 2016 at 17:17
-
Also doesn't work for me running
SQL Server Management Studio v17.9.1
(even for aliases and variables, double checked the shortcut mapping) Oct 15, 2019 at 9:17
In the last version of SSMS (currently version 17.1), select the text and type CTRL + F .
-
This is a nice feature you can find in some MS products like VS and MMS. But it is not highlighting variables, it's just part of the text find feature– jeanAug 3, 2017 at 11:27
This has been added in SSMS 2016. Available for download from https://msdn.microsoft.com/en-us/library/mt238290.aspx
-
3I have
Microsoft SQL Server Management Studio 2016 (13.0.16000.28)
. I get no highlighting when selecting text. Nov 24, 2016 at 11:19 -