-
- Go to Tools on the menu on the top of SSMS.
- Click on Options.
- On the box that opens, on the left menu, select Text Editor and then Plain Text.
- Click on Line Numbers.
- Click on OK and and you are ready to go.
More information can be found at https://docs.microsoft.com/en-us/visualstudio/ide/reference/how-to-display-line-numbers-in-the-editor.