I want to delete the last row from the table that satisfies some condition.
DELETE TOP 1 FROM SOME_TABLE
WHERE SOME_COULMN = @VALUE
ORDER BY 1 DESC
I want to delete the last row from the table that satisfies some condition.
DELETE TOP 1 FROM SOME_TABLE
WHERE SOME_COULMN = @VALUE
ORDER BY 1 DESC
DELETE FROM SOME_TABLE
WHERE UNIQUE_ID =
(SELECT TOP 1 UNIQUE_ID
FROM SOME_TABLE
WHERE SOME_COLUMN = @VALUE
ORDER BY SOMETHING DESC)