select designcode ,path,bh,id ,able from up_color as a where exists (select 1  from item as b where  brandcode='01' and designcode = a.designcode) and a.path<>'' and a.able=1

解决方案 »

  1.   

    select designcode ,path,bh,id ,able from up_color as a where exists (
    select designcode  from item 
    where  brandcode='01' and  designcode = a.designcode) and a.path <> ''  and a.able=1
      

  2.   

    谢谢大家支持,楼上的两位兄弟都写对了,我自己的其实也是对的,没有检索到数据是因为brandcode='01'时没有数据了,我没有仔细看,换成brandcode='02'可以检索到数据.