I am trying to delete the all but the most recent 3,000 items in a table. The table has 105,000 records.
I am trying this, but an error is generated incorrect syntax.
delete tRealtyTrac where creation in( select top 103000 from tRealtyTrac order by creation)
The delete syntax is going to be slightly different from what you have. An example would be:
Notice how there is the “from” keyword. This is saying we want to delete from the table called tRealtyTrac
The one problem I foresee with this is, you are probably going to want to not use creation…
Instead:
Otherwise you may delete more than you intended.