Searching for sub-strings in mysql -
i know if search substring in mysql cell, can following
select * table_name column_name '%search_string%';
how perform search if cell values search strings? example, if have following table,
id string 1 abc 2 def 3 ghi
and have string "123abc567", want able search table result id = 1. mysql statement should use, or have read row row , strstr() in program?
you pretty similarly:
select * table_name '123abc456' concat('%', column_name, '%');
see example: http://sqlfiddle.com/#!9/e0fce/1/0
ps. remove c++
tag because it's unrelated...
Comments
Post a Comment