討論串[SQL ] 顯示最新一筆資料問題
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者cutekid (可愛小孩子)時間12年前 (2013/10/17 22:57), 編輯資訊
0
0
0
內容預覽:
表格內容分析起來. 好像可以如下寫法. 也能達到你的需求:. select *. from 訂單 t1 inner join (. select id,max(date). from 訂單. group by id. ) t2 on t1.id and t2.id. where t1.date =

推噓1(1推 0噓 4→)留言5則,0人參與, 最新作者smallsafe (朋友都消失了)時間12年前 (2013/10/17 22:39), 編輯資訊
0
0
0
內容預覽:
database:. id num date mark. -- ----- -------- ------------. 1 a0001 9/1 訂單內容1. 1 a0002 9/15 訂單內容2. 2 a0003 9/17 訂單內容3. 1 a0004 9/21 訂單內容4. 3 a0005 9/
(還有250個字)
首頁
上一頁
1
下一頁
尾頁