MYSQL如何进行sql like (sql查询结果)的查询
1 create_date like CONCAT('%','2018-04-21','%'); #可以避免sql注入。
2 create_date like '%2018-04-21%';
3
4 select * from table1 where `text` like (select name from table2 where id =3);
5 select * from table1 where `text` like '%'(select name from table2 where id =3)'%';
6 select * from table1 where `text` like '%' + (select name from table2 where id =3) +'%';
7 select * from table1 where `text` like '%(select name from table2 where id =3)%';
8 select * from table1 where `text` like '%’select name from table2 where id =3‘%';
9
10 select * from table1 where `text` like '%(
11 select name from table2 where id =3
12 ) +'%';(第二条SQL单独占一行)