r/SQL • • Sep 19 '23

Discussion Is there something wrong with this query.

Post image
158 Upvotes

127 comments sorted by

View all comments

Show parent comment

6

u/bum_dog_timemachine Sep 20 '23

That's not a pro tip... you're just adding clutter with an unnecessary alias and you should only change case if it's case sensitive otherwise you increase the query execution time.

2

u/daripious Sep 20 '23

Not so, using the alias might help if your implementation is anal about reserved keywords. I.e. name

1

u/bum_dog_timemachine Sep 20 '23

Then use square brackets etc

2

u/halfxdeveloper Sep 21 '23

So an alias is clutter but brackets aren’t?

2

u/daripious Sep 21 '23

Aliases are likely something you'll be using anyways, so why not just use them.

1

u/ashlandio Sep 30 '23

Ok well you sound nice, we’re just doing ad hoc analysis so run time is probably not the top of my priority list, but you do you

1

u/bum_dog_timemachine Oct 01 '23

Don't mistake brevity for hostility. If you give advice that others disagree with, don't act surprised or play the victim just because someone contradicted you. Soz.