想要选出datatable中同一个字段的不同值,类似select distinct 字段 from tablename;

DataTable dt = new DataTable();
DataView dr = dt.DefaultView;
dr.ToTable(true,"字段1","字段2"..);// 第一个参数,表示是否distinct,后面的参数就是你要distinct的字段,可以有多个值。

相关文章:

  • 2021-08-28
  • 2021-07-31
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-01-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-22
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2021-08-27
相关资源
相似解决方案