日期:2014-05-18 浏览次数:20535 次
select M1.Name AS Name1,M2.Name AS Name2,Ma.Content from MemberAction Ma left join Member M1 ON M1.ID = Ma.MemberFromID left join Member M2 ON M2.ID = Ma.MemberToID
------解决方案--------------------
SELECT ( select b.name from member b where a.MemberFromID = b.id ) as MemberFromID ,
( select b.name from member b where a.MemberToID = b.id ) as MemberToID ,
Content
FROM memberaction a
试试吧。