T-SQL,LINQ取集合当中的重复项
T-SQL:
select * from Articles where Title in(Select Title From Articles Group By title Having Count(*) > 1) order by title
LINQ:
from t in Articles where (from t1 in Articles group t1 by t1.Title into groupT where groupT.Count()>1 select groupT.Key).Contains(t.Title) orderby t.Title select t

浙公网安备 33010602011771号