(select id,BBS,BBY from userdetail where id=(select parentid from members where id=a.id) ) b
这个里面不能引用aa和b是平行的
你的这个问题应该用
start with 
connect bygoogle里查找吧