<p>What's the best way to delete all rows from a table in sql but to keep n number of rows on the top?  </p>

```
```
DELETE FROM Table WHERE ID NOT IN (SELECT TOP 10 ID FROM Table)
```
```
Edit:
Chris brings up a good performance hit since the TOP 10 query would be run for each row. If this is a one time thing, then it may not be as big of a deal, but if it is a common thing, then I did look closer at it.