postgres select last 5 rows of table code example Example: postgresql last 12 rows SELECT ... LIMIT 12;