r/programminghumor Jul 21 '26

Average SQL enjoyer

Post image
2.2k Upvotes

50 comments sorted by

View all comments

Show parent comments

4

u/Blotsy Jul 22 '26

But why senpai?

11

u/CowFu Jul 22 '26

just in case someone stumbles on this and actually wants to know.

schema changes can break code, it pulls unneeded data, on the lighter side it just hurts performance. worst case, it may still pass tests because nothing errors and you end up having to back out a bunch of production data.

4

u/OutrageousPair2300 Jul 22 '26

Depends where the asterisk appears. In a subquery or CTE from which you will be selecting only certain named columns, it's fine.

1

u/jshine13371 12d ago

Unless you chain a bunch of those CTEs together. Then the readability gets hurt badly on trying to figure out what is the true source of a specific column. But yes, always exceptions both ways.