Is there a more efficient method to find dupes in Sql server
问题 I have this question for which I provided a solution. However, I don't feel that is as efficient as it could be: using (DataContext context = new DataContext(SqlConnection) { var custInfo = context.GetTable<tbl_CustomerInfo>(); string compID = ImportCust.Rows[0]["CompanyID"].ToString(); var imports = from cust in ImportCust.AsEnumerable() select cust.Field<int>("CustomerID"); var dupes = from import in imports join cust in custInfo on import equals cust.CustomerID where cust.CompanyID==