SQL Server 101 – How to Delete Top N records ?

Assume that you have a table named “Employee” in MS SQL Server and you would like to delete the top 1000 rows from the table. You can use the SQL Query with the TOP (N) as option as shown below. Here’s N is the number of records that you want to delete.

How to Delete Top N records in MS SQL Server ?

FROM Employee
WHERE IsMarkedForDelete = 1

Copy link
Powered by Social Snap