倒 , 这个语句的确很有趣,呵呵这样不就可以了
select BBSid,Fatherid,Menuid,BBSTopic,AddDt,isTop,Emails,BelongToCus,StateValue,Priority,uploadDir,LastPost,child,click,ip_addr from bbs where Emails like '%[email protected]%'

解决方案 »

  1.   

    你是不是想要这样的子查询例子select a1,a2 from a where a1 in (select b1 from b where b2 like '%helloworld%')在mysql中可以通过连接实现
    select a1,a2 from a,b where a1=b1 and b2 like '%helloworld%'
      

  2.   

    我写错了,在sql server中是这样的
    select BBSid,Fatherid,Menuid,BBSTopic from bbs where BBSid in (select Fatherid from bbs where Emails like '%[email protected]%')改写成mysql应该是怎么样的
      

  3.   

    SELECT b1.BBSid, b1.Fatherid, b1.Menuid, b1.BBSTopic FROM bbs b1
      LEFT JOIN bbs b2 on b1.BBSid=b2.Fatherid
      WHERE b2.Emails like '%[email protected]%'