Mysql
 sql >> Database >  >> RDS >> Mysql

Ottieni il valore MAX nella query MySQL

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

Oppure

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