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
时间: 2024-10-11 15:56:06