Reputation: 1
I have a MySql database with some data like this:
str = '554a41a6e4d9d 677 3'
and i want to search all the values that exactly match the '677' part (the second part of text, after the first).
How i can accomplish this?
Upvotes: 0
Views: 15
Reputation: 27082
If the 'parts' are delimited by space, you can use like
:
SELECT [cols] FROM [table] WHERE [col] LIKE '% 677 %'
Upvotes: 1
Reputation:
You should use Fulltext
type for the column
. And then use a query like this:
SELECT * FROM table WHERE MATCH (column) AGAINST ('677');
Upvotes: 0