问题
Is there a way in SQL SERVER MANAGEMENT STUDIO to highlight all usage of variables when we click on a variable name?
回答1:
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.
回答2:
No, there's not such feature on SSMS
回答3:
In the last version of SSMS (currently version 17.1), select the text and type CTRL + F .

回答4:
This has been added in SSMS 2016. Available for download from https://msdn.microsoft.com/en-us/library/mt238290.aspx
来源:https://stackoverflow.com/questions/21899826/sql-server-management-studio-highlight-variables