Skip to content
Advertisement

Keep only N last records in SQLite database, sorted by date

I have an SQLite database that I need to do the following: Keep only last N records, sorted by date. How do you do that?

Advertisement

Answer

To delete all but the latest 10 records.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement