I'm trying to make a mysql query that checks if a column in a row is contained within another column in the same row. Is there a way to do that kinda of query?
for example:
Key Value runHash
2500 tacos night.2500.293849284
1775 windows day.176555.43035842
I am trying to write a query that will return the second row and not the first because for the first row, Key is in runHash.
I tried to do:
select * from table where key not in runHash
However this doesn't appear to be valid for mysql.
You are looking for like
:
where runHash like concat('%', key, '%')
You can put periods in the pattern as well, if those are important for your pattern matching.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments