sql server ce - Sql Compact 3.5: Limit number of rows in column -


i have table rows of following form: timestamp data: keep newest n rows in table, , delete rest.

is there way specify deletion of except n newest rows?

delete table  id not in (     select top 30 id table     order timestampcolumn desc ) 

here n = 30. can replace number 30 number want retain.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -