Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To highlight identical literals when selecting a string in a script in SQL Server Management Studio (SSMS), you can follow these steps:

  1. Open SSMS and go to Tools > Options.
  2. In the Options dialog box, expand Text Editor > Transact-SQL > General.
  3. Check the box next to "Enable highlighting of identical text" and click OK.
  4. To test this feature, open a query window and type a string literal (enclosed in single quotes) multiple times in the same query. Select one instance of the string by double-clicking on it.
  5. All other instances of the string will be highlighted with a yellow background, making it easy to identify and update multiple instances of the same value.

Note: This feature works for string literals only and not for other types of literals or variables.