日期:2014-05-17 浏览次数:20613 次
SELECT A.名称,A.父亲,A.母亲 ,F.父亲 AS 父父,F.母亲 AS 父母 ,M.父亲 AS 母父,M.母亲 AS 母父 ,FF.父亲 AS 父父父,FF.母亲 AS 父父母 ,FM.父亲 AS 父母父,FM.母亲 AS 父母母 ,MF.父亲 AS 母父父,MF.母亲 AS 母父母 ,MM.父亲 AS 母母父,MM.母亲 AS 母母母 FROM TABLE1 A LEFT JOIN TABLE1 F ON A.父亲 = F.名称 LEFT JOIN TABLE1 M ON A.母亲 = M.名称 LEFT JOIN TABLE1 FF ON F.父亲 = FF.名称 LEFT JOIN TABLE1 FM ON F.母亲 = FM.名称 LEFT JOIN TABLE1 MF ON M.父亲 = MF.名称 LEFT JOIN TABLE1 MM ON M.母亲 = MM.名称