摘要: SELECT p.* , CASE WHEN u.tongji IS null THEN 0 ELSE u.tongji ENDFROM dbo.AS_Project AS p LEFT JOIN ( SELECT COUNT(0) AS tongji , ProjectId FROM dbo.AS_Url WHERE ProjectId IN ( SELECT id FROM dbo.AS_Project ) GROUP BY ProjectId ) AS u ON p.id = u.ProjectId 阅读全文
posted @ 2011-06-21 14:32 Frida- 阅读(156) 评论(0) 推荐(0) 编辑