How to get second MAXIMUM DATE in MYSQL

后端 未结 4 981
我在风中等你
我在风中等你 2021-01-29 16:27

I want to fetch my record from mysql db. I want to fetch second maximum date from the record. But i failed

Here is my code

    

        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-29 17:10

    You can use simply below query to get second max date in a table or with your requirement : -

    select joiningDate from t_member order by joiningDate desc limit 1,1
    

提交回复
热议问题