MySQL: Get most recent record

后端 未结 7 1699
情歌与酒
情歌与酒 2020-11-28 20:42

In the table below, how do I get just the most recent record of id=1 based on the signin column and not all 3 records?

+----+--         


        
相关标签:
7条回答
  • 2020-11-28 21:29
    Select [insert your fields here]
    from tablename 
    where signin = (select max(signin) from tablename where ID = 1)
    
    0 讨论(0)
提交回复
热议问题