比如说现在有3个条件iapplystatus = 3  
                   strapplyername = 某某 
                   strtitle = 333;我在数据库里怎么同时查找3个啊。。我是新手,谁路过帮个忙呗select * from ybdeviceapplyform where iapplystatus = 3 and strapplyername = '某某' and strtitle = 333;这样吗?

解决方案 »

  1.   


    如果是要同时满足三个条件就用and
    如果是满足其中一个就可以 就用or
      

  2.   

    -- 查询符合给定的记录行数(只是个数),可以这样:
    select count(*)
      from ybdeviceapplyform
     where iapplystatus = 3 
       and strapplyername = '某某' 
       and strtitle = 333;
      

  3.   

    -- and 意思是:并且
    -- or  意思是:或者-- 逻辑运算:与、或、非,相对大家来说,应该很清楚!