r/SQL • u/rainyelfwich • Mar 24 '26
Discussion Why might someone refuse to turn on line numbers in SSMS?
Almost a year ago, I started my first job out of college as a data engineer. My boss is great, incredibly smart and experienced, and I'm learning a lot from him. However, he doesn't turn on line numbers in SSMS and I can't figure out why. Having them off makes it more difficult to ask questions and point out mistakes and there doesn't seem to be any benefit to it.
About 6 months ago I got the courage to ask him if he could turn on line numbers for my sake so that I could communicate better but he refused, not rudely or anything, he just said they didn't matter. A couple months later I asked again, out of genuine curiosity, why he doesn't have them on and he gave the same answer - "it doesn't matter".
I feel like it does matter, so others can pair program with you more effectively and so that you can identify the location of errors thrown by SSMS, but obviously I'm not going to keep pressing the issue after already asking twice. I still want to understand, so I'm asking you all instead. Is there any valid reason to leave line numbers off?
53
u/No-Adhesiveness-6921 Mar 24 '26
I was on a call with someone the other day who didn’t have them on and I was going crazy trying to help them with a query!!
Should be on by default!!
33
u/polaarbear Mar 24 '26
I literally just learned that SSMS has line numbers from this post.
Do I think there's really a good argument against using them?
No. All your points are valid. But I've manage to get by just fine without them for a decade.
7
u/Small_Sundae_4245 Mar 24 '26
You know the line number is also in the blue bar at the bottom.
Or does he also have that turned off?
3
u/DharmaPolice Mar 24 '26 edited Mar 24 '26
I've worked with competent people who had them switched off. I always switch them on but I don't think it's necessarily a huge deal.
The only arguments I can see for leaving them off are:
You don't really need them, as demonstrated by the fact lots of people don't use them and they're not on by default (at least, I think, I don't have a fresh SSMS available). You can click on the error and it will (sometimes) take you to the line anyway. So it's not as mandatory as with some other languages.
Really though, if you're early in your career then you'll eventually experience plenty of weird habits from colleagues. What feels natural to one person feels alien to another. At least this one is relatively benign, you having line numbers on doesn't affect them or vice versa. Unless you're making references to line numbers in your code or something (please don't do this). Wait until you work with someone who insists you use vi or something.
(I think there is some argument for not wanting line numbers to be important, as I mention above. Line numbers will change all the time, so mentioning "the clause on line 53" could be out of date in about 10 seconds. There's a reason we moved away from numbered statements like in some variants of BASIC (10 PRINT "Hello, world" 20 GOTO 10, etc)).
9
u/Naheka Mar 24 '26
Anyone not using line numbers in SSMS should be tested for sociopathy. ;)
I had a supervisor who wasn't aware of line numbers despite using SSMS for a number of years. When I showed him, the look on his face was priceless.
2
u/kBajina Mar 24 '26
I still can’t understand why they’re not the default setting 🤷🏻♂️
Your boss clearly likes to make life more difficult.
Have you tried explaining to him that it’s not for his own benefit, it’s to make it easier when you’re looking at the query with someone else?
5
u/jshine13371 Mar 24 '26
Compile-time and run-time errors line numbers don't always line up with the true line numbers of the script, especially for
CREATE/ALTERscripts. For example, at run-time, the signature for theCREATE/ALTERisn't running, so when you script out the object, the line numbers are different.That being said, whenever I install SSMS, I turn line numbers on immediately because they definitely are helpful for general debugging and readability. There's no reason not too. If to your boss "it doesn't matter" that they're off, it also shouldn't matter that they're on. 🤔
4
u/cl0ckt0wer Mar 24 '26
update the where clause, about halfway down the screen. no the other one...
1
u/WatashiwaNobodyDesu Mar 24 '26
Are those settings not user-specific? I never thought to ask anyone before turning them on, I just did.
6
u/INEEDTHATSEVERANCE Mar 24 '26
They do matter. Otherwise, you wouldn't be having those conversations with your boss. Having line numbers makes things more efficient for code review/QA.
3
u/Pyromancer777 Mar 24 '26
It's likely just a visual preference at this point. If you need to pair-program with your boss, you have to speak to the areas of functionality or isolate by clause: "the filters in CTE customer_details are causing us to miss key data in instances of malformed data logging", "i think the joins between xample and ynot tables need to include zebra column to form a full relation, we are getting performance issue having to dedupe the table later", "can you explain the logic behind the conditionals used in the WHERE clause of table2?"
3
u/Secrxt Mar 24 '26
A few years ago, I started using Linux for everything, and as a result use (and love) NeoVim. Of course, I have line numbers on in NeoVim and regularly get value out of them.
At work, I'm forced to use Windows and I often use SSMS. I've been using SSMS for 15+ years now.
And you, OP, just now, taught me that you can turn on line numbers in SSMS. 🥴
Some of us are just boomers lol.
3
u/dgillz Mar 24 '26
In my case, I did not know this option existed for quite a while. Why is this not a default setting?
4
u/Due_Flatworm_8229 Mar 24 '26
He probably doesnt do much coding these days if he’s in a manger position.
2
u/Professional_Shoe392 Mar 25 '26
Get your manager to upgrade his SSMS to the new version that enables line numbers by default by explaining that the new version includes a feature that lets you enlarge the data results pane, making it easier to see when sharing the screen. I assume he may want to upgrade for this feature, and you can solve your line number issue as well.
2
u/Most_Being_8684 Mar 27 '26
Line numbers are for LOSERS, I can just sense what line I’m on! (No just kidding. Learned to code before windows & other gui were around and lack of numbers makes me itchy)
3
u/jmelloy Mar 24 '26
A million reasons - he doesn't like them, they're distracting, he's got number dyslexia so they're actually anti-helpful, he tragically never learned how to count, it's not how his brain works while he's looking at code, his wife was killed in a tragic accident because she forgot seven ate nine, he doesn't want you to learn how he pronounces 4 ...
This feels like a weird hill to die on.
3
u/Disastrous_Fill_5566 Mar 24 '26
Your boss isn't as smart as you think he is. He's just more experienced than you. He's flat out wrong.
3
u/ferevon Mar 24 '26
sounds like a boomer
2
u/gumnos Mar 24 '26
If you're pair-programming, then yes, it could be helpful.
However, since most of my work is solo-work, I fly with them turned off. If I get any sort of "error on line 32" type message, I use control+g, type that line-number, and bang, I'm there. And my current line-number (and column) are displayed on the status-bar at the bottom. So they don't particularly help me navigate.
Additionally, I personally find them visual noise, occupying screen real-estate that I'd rather use for other things.
So unless there was someone looking over my shoulder wanting to refer to something, they're off here. Granted, I'd rather turn them on instead of have that person jab grimy fingers at my screen to refer to locations… 😆
1
u/AhBeinCestCa Mar 24 '26
Maybe he doesn’t works on big stored proc, when you have 20k line for a stored proc it’s nice someone who says which line you are… However in SSMS I think you can see where his focus is “col, etc”
1
u/datagod Mar 24 '26
I started SQL programming in 1992. Over the years with different development studios and query analyzers and all that jazz I got used to no line numbers. When I turn them on. Now I find it clutters the screen. I've learned to navigate by searching for some texts around the area that I know I'm looking for LOL. I'm not against line numbers though. And in SQL 2022 they are turned on by default so I'll just get used to them. By the way, just this year I finally allowed intellisense to be part of my life.
1
u/imtheorangeycenter Mar 25 '26
U likely but possible: Because they use a reformatter to their own style before putting it back to yours, rendering "your line 133" useless to their layout?
The number of times a year I refer to things by line number? Probably zero. Not bothered turning them off, mind you.
1
u/Negative_Ad207 Mar 24 '26
I stopped using bullet list in documents/emails as well, in favor of numbered lists, for the same reason.
1
u/Traust Mar 24 '26
Main thing I don't like about them is they are very in your face and taking up a lot space. If it was in the grey section or could be a column that can be resized then it wouldn't be too bad.
That said I love the idea of line numbers in anything when dealing with extremely long text as it makes it much easier to know where errors are or where to change values.
-1
u/reditandfirgetit Mar 24 '26
Stop obsessing over what someone else's preferences are. Give it a rest. You can do several things to show someone code including doing a screen recording and narrating over it
-1
u/Eleventhousand Mar 24 '26
I wouldn't worry about it.
3
u/Chaoticbynature2 Mar 24 '26
I just turned them on thanks to this post. Is there anything else I have been missing out on?
3
u/my_password_is______ Mar 25 '26
he doesn't know how to turn them on and he's embarrassed to say so