Mysql
 sql >> Base de données >  >> RDS >> Mysql

Obtenir la valeur MAX dans la requête mysql

Select Id,mid,userid,remarks from sample Where id<(select max(Id) from sample)
order by id desc limit 1

Ou

Select Id,mid,userid,remarks from sample 
order by id desc limit 1 offset 1