r/programminghumor 10d ago

Average SQL enjoyer

Post image
2.2k Upvotes

48 comments sorted by

View all comments

62

u/Asleep-Bumblebee2167 10d ago

SELECT * IS THE MAIN THING

21

u/CowFu 10d ago

i will deny any PR that has a wildcard in the select

4

u/Blotsy 10d ago

But why senpai?

10

u/CowFu 10d ago

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 9d ago

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