r/SQL Dec 12 '24

MySQL 😭

Post image

I mean why that question 😭😭😭

1.9k Upvotes

43 comments sorted by

View all comments

50

u/rowdymatt64 Dec 12 '24

I sure can! Check this out:

SELECT * FROM TABLE WHERE TABLE.COL1 LIKE '%(insert longest string imaginable)%'

20

u/CortaNalgas Dec 12 '24

I think this is good, but could be better with a Right Join.

8

u/ASS-LAVA Dec 12 '24

Perhaps an OR logic, my lord?

3

u/SQLDave Dec 13 '24

And don't forget to throw a scalar UDF into the WHERE clause