日期:2014-05-18 浏览次数:20758 次
select a.activeName,b.name as Aname,c.name as Cname,d.name as Dname,e.name as Ename from [Active] a join student b on a.colA = b.id join student c on a.colB = c.id join student d on a.colC = d.id join student e on a.colD = e.id
------解决方案--------------------
那就用笨办法
select Active,activeName,(select name from student where colA=Active.id) colA ,(select name from student where colB=Active.id) colB ,(select name from student where colC=Active.id) colC ,(select name from student where colD=Active.id) colD from [Active]