有一个字段保存如下值:
第一行 sales,order 
第二行 digital1,digital2,sales
第三行 digital1,digital2,game_sales,sales_game, 想通过查询得出与单词sales相匹配的数据

解决方案 »

  1.   

    select *
    from yourTable
    where fd like '&sales%';
    == 思想重于技巧 ==
      

  2.   

    select *
    from yourTable
    where ','+fd+',' like '%,sales,%';
      

  3.   

    这个思路对的,怎么出不了结果,我的mysql是4.1.9的
      

  4.   

    这个好像不是想要的结果
    我想要的是其中一行当中有这个单词就行,但是又不能包含这个单词如:game_sales或sales_game的查出来
      

  5.   

    select *  
    from yourTable  
    where concat(',', fd, ',') like '%,sales,%'; 
    解决了,谢谢!