I've come up with some interesting workarounds for missing features using @session variables and I'd like to share one with you today: DELETE ... JOIN ... LIMIT N;
okay, so we've got two tables, one with many duplicates and one with no duplicates. We want to join the tables using 'id', but only want to delete N duplicates from t1. MySQL's DELETE does not include LIMIT support when JOIN is used, so we need to work around that using some fancy footwork:
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.