It is easy to find last row from table. The below query can be used to get last row from table.
$sql="select * from <table name> order by <field name> desc limit 1"
It displays one last row from table.
More Articles...
Wednesday, June 17, 2009
How to get last row from database table?
Labels:
database
Related Posts
- Released a new ebook "Mastering SQL: A Comprehensive Guide to Database Mastery"
- Comparison of TRUNCATE, DELETE, and DROP in SQL
- Basic SQL Questions and Answers
- Work around for solving round off issues when converting existing MySql Column from FLOAT to DOUBLE
- Using both "sum" and "limit" in a mysql query
Search This Blog

AI Course | Bundle Offer | Unlocking AI | Dream Big | Listen to Dream Big
Today's Deals | Timesheet | Products | SQL ebook | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
No comments:
Post a Comment