sqlserver 查詢數據表中每一個類別最新的一條記錄

本文此處所規定的類別爲省份ID,原始表以下圖所示:sql 所使用SQL語句爲:code select a.* from tbl_MaterialPice a,(select province_ID,max(price_time) price_time from tbl_MaterialPice group by province_ID) b where a.price_time = b.pric
相關文章
相關標籤/搜索