DataTable dt01= new DataTable(); DataTable dt02= new DataTable(); DataTable dtRs = new DataTable(); dt01=sqlHelper.GetDataTable(strSQL001) dt02=sqlHelper.GetDataTable(strSQL002) //数据表dt02与dt01合并 dt01.Merge(dt02); //多个表合并可能产生重复数据,过滤掉重复数据 DataView dv = new DataView(dt01); dtRs = dv.ToTable(true, new[] { "ID", "WordName" });
.Net多个DataTable合并,及过滤掉DataTable中重复数据行,布布扣,bubuko.com
.Net多个DataTable合并,及过滤掉DataTable中重复数据行
原文:http://blog.csdn.net/aspnet2002web/article/details/27415769