mysql 模糊查询 concat()
concat() 函数,是用来连接字符串。
精确查询: select * from user where name=”zhangsan”
模糊查询; select * from user where name like “%zhang%”
在实际的使用中,条件是作为参数传递进来的。 所以我们使用 concat() 函数
mybatis:
select * from user where name like concat(“%”, #{name},”%”)
concat(str1,str2,str3,str4,……….); 连接字符串函数,会生成一个字符串
我喜欢程序员,他们单纯、固执、容易体会到成就感;面对压力,能够挑灯夜战不眠不休;面对困难,能够迎难而上挑战自我。他
们也会感到困惑与傍徨,但每个程序员的心中都有一个比尔盖茨或是乔布斯的梦想“用智慧开创属于自己的事业”。我想说的是,其
实我是一个程序员