Mysql查询语句中like 的用法

Mysql的通配符是 %

SELECT * FROM `ff_vod` WHERE `vod_pic` like '188%'         查找"ff_vod"表,"vod_pic"字段以188开头的数据

SELECT * FROM `ff_vod` WHERE `vod_pic` like '%188'         查找"ff_vod"表,"vod_pic"字段以188结尾的数据

SELECT * FROM `ff_vod` WHERE `vod_pic` like '%188%'      查找"ff_vod"表,"vod_pic"字段包含188的数据

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: