I have a MySQL query that looks like this:
SELECT * FROM notifications WHERE userid=1 ORDER BY date DESC LIMIT 100;
How would I create a query that deletes all the rows beyond that 100 limit in the above query? So rows 1-100 I want to display and rows 100+ I want to delete. It doesn't have to be all in the same query.