Sounds to me like you want to create an HTML table showing the last 10 records (or latest 10 records) from the database.
Depending upon your SQL server (Postgres, MySQL, MS SQL, Firebird, ODBC, sqlite, etc.) you should just be able to add a LIMIT clause to your query so it looks something like:
SELECT * FROM `tablename` LIMIT 10
That will limit the number of results you receive to be just ten records.