I have a table in SQL Server. I would like to delete the top 1000 rows from it. However, I tried this, but I instead of just deleting the top 1000 rows it deleted all the
It is fast. Try it:
DELETE FROM YourTABLE FROM (SELECT TOP XX PK FROM YourTABLE) tbl WHERE YourTABLE.PK = tbl.PK
Replace YourTABLE by table name, XX by a number, for example 1000, pk is the name of the primary key field of your table.
YourTABLE
XX
pk