and  (c.field='1' and c.listid='1' and c.fcont='A1')
and  (c.field='1' and c.listid='2' and c.fcont='A2')
你确定这样的条件吗?好像不可能吧,两个条件不会同时满足的

解决方案 »

  1.   

    连接几个表,然后进行查询吧
    select * from 
    A inner join B 
    on A.bosid = B.bosid
    inner join C
    on B.bosid = C.bosid and B.field = C.field
    inner join D
    on C.bosid = D.bosid and C.field = D.field
    where 可以加上你的条件了
    例如 where title = 'title1' and field = '1' and list = '1'
      

  2.   

    我试过join的方式,还是无法满足所有条件。而且我所列出的条件有可能只是一个查询子条件,不知道可不可以通过存储过程或视图来完成查询
      

  3.   

    经过测试可以采用UNION的方式完成该功能,不知道有没有其他好的方法。