How to find out the last row data from database. It’s very useful to developers. Suppose our table has different field and multiple row values exist. We find the last values from database for some purpose like find the last row values id or something like this.
Select * from table name order by id desc limit 1;
SELECT * FROM student_master ORDER BY student_id DESC LIMIT 1
From the above code we get the last row values from student_master table in mysql.