日期:2014-05-16  浏览次数:20690 次

mysql语句select id from user where info like '%'+id,like后的怎么写?
语句select id from user where info like '%'+id是错误的,like后错了。
请教like后的怎么写。
id是主键,要like的数据要包含id。
求解!

------解决方案--------------------
select id from user where info like concat('%',id)
------解决方案--------------------
select id from user where info like concat('%',id)

或者

select id from user where instr(info ,id)