mysql 模糊查询

0 0 mysql
起名焦虑症
起名焦虑症

声望值:210 0人

2019-03-08 09:08:38 提问

关注 0关注

收藏 0收藏, 141浏览

sql语句:

select case ISNULL(case ISNULL(CA.ip) when true then C.crsIp else CA.ip  end) when true then '该设备已被删除' else (case ISNULL(CA.ip) when true then C.crsIp else CA.ip  end) end as ip,case ISNULL(case ISNULL(CA.cameraName) when true then C.crsName else CA.cameraName end) when true then '该设备已被删除' else (case ISNULL(CA.cameraName) when true then C.crsName else CA.cameraName end) end as devname,F.faultCode,F.memo,F.isLock,F.startTime,F.endTime from fault_list as F left join crossing as C on F.faultCode=C.crsCode left join camera as CA on F.faultCode=CA.cameraCode where F.isLock=1

现在我想用devname或ip进行模糊查询 该怎么写 说明一下 我在sql字段中用了条件语句

请先 登录 后评论

0个回答

注册新账号

悬赏追问
10
  • 10
  • 20
  • 50
  • 100
  • 200
  • 输入数值
发布追问