首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

mysql语句select id from user where info like '%'+id,like后的如何写

2012-06-14 
mysql语句select id from user where info like %+id,like后的怎么写?语句select id from user where in

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)

热点排行