select t.dw,t1.name from jbxxb tleft join department t1 on t.dw=t1.code
重复项的原因是不是因为jbxxb中某些记录的dw本来就是一样的,这样查询出来就会有多条一样的记录了。