Skip to content

Instantly share code, notes, and snippets.

@Kcko
Created June 3, 2014 20:53
Show Gist options
  • Save Kcko/091882edc3ed62e4b82e to your computer and use it in GitHub Desktop.
Save Kcko/091882edc3ed62e4b82e to your computer and use it in GitHub Desktop.
Delete from table with limit (first X rows excluded)
DELETE FROM table
WHERE ID IN
(
SELECT ID
FROM
(
SELECT ID
FROM table
WHERE Type = 'TEST'
ORDER BY ID
LIMIT 30,60
) a
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment