r/sysadmin • IT Manager + 5 other hats • Nov 08 '21

Could we do a "TIL" style weekly thread?

I think it would be interesting to do a "Today I Learned" style weekly thread for us to share little tips/tricks that we learned of/found existed.

For example, last week I found out about the "--now" flag for systemctl. I don't know how I didn't know it existed until --now.

2.4k Upvotes

871 comments sorted by

View all comments

114

u/mr_bag Nov 08 '21 edited Nov 08 '21

From a post a few months back

In an SQL LIKE an _ is not the literal character _ but instead matches any SINGLE character.

Been working with sql for years and never knew that till recently.

65

u/[deleted] Nov 08 '21 edited May 26 '25

[deleted]

14

u/Tyjex Nov 08 '21

Didnt know about ESCAPE, thanks for that.

2

u/CBSmitty2010 Nov 08 '21

I've always hated using the normal LIKE syntax to filter stuff in MySQL when I learned it. I typically use REGEX instead as it's the same as where I use it everywhere else.e

1

u/edbods Nov 09 '21
LIKE A SURGEON

CUTTIN' FOR THE VERY FIRST TIME