扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:builder.com.cn 2007年4月26日
关键字: SQL Server
在本页阅读全文(共4页)
/* count the ingredients required */
SELECT
[Recipe Ingredients].RecipeID,
Count([Recipe Ingredients].IngredientID) AS Required
FROM
[Recipe Ingredients]
GROUP BY
[Recipe Ingredients].RecipeID;
/* count the ingredients available */
SELECT
[Recipe Ingredients].RecipeID,
Count(Pantry.IngredientID) AS Available
FROM Pantry
RIGHT JOIN [Recipe Ingredients]
ON Pantry.IngredientID = [Recipe Ingredients].IngredientID
GROUP BY
[Recipe Ingredients].RecipeID;
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。