请教问题?
SELECT a.sBillNo AS sId,a.sBomName,a.sProductId,b.sName,'' AS sParentId,a.iCheck
FROM Rad_Bom a LEFT JOIN BS_Item b ON a.sProductId= b.sId
UNION
SELECT c.sBillNo AS sId,c.sBomName,c.sProductId,d.sName,a.sBillNo AS sParentId,c.iCheck
FROM Rad_Bom a LEFT JOIN ( Rad_Bom_Detail b
LEFT JOIN Rad_Bom c ON b.sItemId=c.sProductId
LEFT JOIN BS_Item d ON d.sId=b.sItemId ) ON a.sBillNo=b.sBillNo
WHERE c.sBillNo IS NOT NULL
请问各位大侠给小弟解释一下上面语句的作用,急!!!! 谢谢!!!!!