例如下面的查詢:
select distinct id, name from user
是將 id 與 name 作爲一個組合進行去重操作,如果想要指定按照其中的 id 字段進行去重可以用 group by 與 count 配合使用:
select id, name, count(distinct id) from user group by id, name
例如下面的查詢:
select distinct id, name from user
是將 id 與 name 作爲一個組合進行去重操作,如果想要指定按照其中的 id 字段進行去重可以用 group by 與 count 配合使用:
select id, name, count(distinct id) from user group by id, name
五、操縱dataset 在DataSet中DataRow是其所有數據的基本存放位置,它主要是由一個值數組組成,代表DataTable單獨一行。 Da