Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 LINQ 中表达 SQL HAVING 子句?
我正在寻找重复项。
SELECT AssetId, COUNT(*) FROM ASSET GROUP BY AssetName HAVING COUNT(*) > 1
如果没有特殊的语法并且答案是堆积查询,只需用尽可能多的单词说出来。
from asset in MyAssetTable group asset by asset.AssetName into AssetNames where AssetNames.Count() > 1 select new { AssetNames.Key, AssetNames.Count() }