假如要 Select * From 表 Where 字段=1 and 字段=2 and 字段=3 and ......有没有这样的语句:Select * From 表 Where 字段=1,2,3......
批量删除,批量查询,依靠一个字段的语句

解决方案 »

  1.   

    Select * From 表 Where 字段 in(1,2,3)不过这是 or 的
      

  2.   

    Select * From 表 Where 字段=1 and 字段=2 and 字段=3
    where cast(字段1 as varchar) + '%' + cast(字段2 as varchar) + '%' + cast(字段3 as varchar) = '1%2%3'
      

  3.   

    字段=1 and 字段=2 and 字段=3 and ......?逻辑不通吧.字段=1 or 字段=2 or 字段=3 or ......?字段 in (1,2,3......)
      

  4.   

    Select * From 表 Where 字段=1,2,3......where(字段,字段,字段)=(1,2,3)Select * From 表 Where 字段 in(1,2,3)Select * From 表 Where 字段 =any(1,2,3)
      

  5.   

    打错,是 or 不是 and