Reputation: 9165
Without referencing the SERIAL id.
Something like:
delete from users LAST 3
which would delete last 3 rows from the table.
Upvotes: 7
Views: 10325
Reputation: 3966
This will work :
DELETE
FROM users
WHERE id in (
SELECT id
FROM users
ORDER BY id desc
LIMIT 3
)
Upvotes: 11