表 xjgl 欄位:id, xh, fenshu, time。每個學號 (xh) 對應多筆記錄,需查詢每位學生最近一次記錄 (按 time 降序)。GROUP BY 無法直接達成。解法:
xjgl
id, xh, fenshu, time
GROUP BY
select * from xjgl x where id = (select top 1 id from xjgl y where y.xh=x.xh order by sj desc)
子查詢關聯外部學號,取最新一筆 id,外層查詢返回完整記錄。
前言 預設 GridView 單列編輯 (EditIndex
ASP.NET 將 Web 頁面視為伺服器端表單,引入事件驅
承接前兩篇(LINQ 查詢與儲存程序),本文介紹 Visua
核心需求 隱藏 Windows 任務欄,佔據整個螢幕工作區