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
Post a Comment