错了,错了,结果应该是
userid    name     descript   countvote
1         chenyh   aaaa       3
2         wang     bbbb       1
3         li       cccc       2

解决方案 »

  1.   

    select A.id userid, A.name, A.descript, count(B.*) countvote 
    from tablea A
    left join tableb B on A.id = B.userid
      

  2.   

    try:
    select id,name,descript,count(b.*) as countvote from tablea a,tableb b
    where a.id=b.userid
    group by id,name,descript
      

  3.   

    select * from a aa left join 
    (select userid,count(*) countvote from b group by userid)bb
    on aa.id=bb.userid
      

  4.   

    select a.userid,a.name,a.descript,count(b.userid) as countvote
    from table a inner join table b on a.userid=b.userid
      

  5.   

    select id,name,descript,count(b.userid) as countvote from table a,table b
    where a.id=b.userid
    group by id,name,descript
      

  6.   

    select userid,name,descript,max(voteid) as vountvode
    from a,b where a.id=b.userid
      

  7.   

    select userid, name, descript, count(B.*) as  countvote 
    from tablea A
    left join tableb B on A.id = B.userid
    group by userid,name,descript