mysql where exact match

后端 未结 4 874
梦谈多话
梦谈多话 2021-01-14 04:47

When i write this query

SELECT cd.title, cd.city FROM coupon_detail cd WHERE cd.id = 260;

return

title            city  
--         


        
4条回答
  •  误落风尘
    2021-01-14 04:52

    use like instead = because if the string is too long than exact match won't work in that way
    SELECT cd.title, cd.city FROM coupon_detail cd WHERE cd.id LIKE '260abcxyz';

提交回复
热议问题