表付款架构
installment | remaining balance | date
----------------------------------------
6,000 | 50,000 | 03 March 2017 5:30 PM
10,000 | 40,000 | 04 March 2017 7:00 AM
3,000 | 37,000 | 08 March 2017 3:00 PM
我想选择此行的最后一条记录
3,000 | 37,000 | 08 March 2017 3:00 PM
我怎么能在mysql中实现呢?
答案 0 :(得分:0)
您可以使用ORDER BY
和LIMIT
,例如:
SELECT *
FROM payment
ORDER BY date DESC LIMIT 1;