select  bj.id,jg.jg  from  bj,jg  where  bj.flag=1 and bj.id=jg.id