Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Under a column named "name" I have a row which holds the value "Joe".
What can I use so when I search "Joe Bloggs" it will return the row that only holds "Joe"?
You could do this:
SELECT * FROM mytable WHERE INSTR(:value, name) > 0
Where :value should be the parameter you will bind to that SQL statement.
:value
Add a comment
You can also use LIKE:
LIKE
select * from t where $value like concat('%', name, '%');
If you want the name "Joe" only at the beginning:
select * from t where $value like concat(name, '%');
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.