Reputation: 169
how can I get the latest date in mysql?
In the image I just want to get MEMB_N, LAST_M and the latest date which is under id = 655369, 2019-7-29.
Upvotes: 2
Views: 35
Reputation: 1269813
If you are looking for one row, use order by
and limit
:
select t.*
from t
where t.printdate is not null
order by t.printdate desc
limit 1;
Upvotes: 2