SELECT g.* FROM kjj.dbo.GoodsStocks g LEFT JOIN kjy.dbo.ptype p1 ON p1.typeId=g.PtypeId LEFT JOIN kjy.dbo.ptype p2 ON p2.typeId=p1.ParId LEFT JOIN kjy.dbo.ptype p3 ON p3.typeId=p2.ParId LEFT JOIN kjy.dbo.ptype p4 ON p4.typeId=p3.ParId WHERE p4.typeId<>'00006' 这什么意思额 连接这么多个搞不懂了