select 字段A form 表1 where 字段B in(1,2,3,4,5,6);

解决方案 »

  1.   

    好像不行啊!请问是不是要加''个啊!如字段b in('1','2'))是不是啊
      

  2.   

    例:
    SELECT * FROM table WHERE (name IN ('张俊杰', '李凤岭', '王永生'))
      

  3.   

    字段B是int型:select 字段A form 表1 where 字段B in (1,2,3,4,5,6);
    其他类型:select 字段A form 表1 where 字段B in ('1','2','3','4','5','6');
      

  4.   

    select a from table1 where b in ( 1, 2, 3, 4, 5, 6 )
    // if b is int
      

  5.   

    字段B是int型:select 字段A form 表1 where 字段B in (1,2,3,4,5,6);
    其他类型:select 字段A form 表1 where 字段B in ('1','2','3','4','5','6');
    同意,比较详细