Is this possible? Before a row is inserted into tableA, I need to delete any rows in tableA containing duplicate data.The trigger below does not generate an error but doesn't work either.
CREATE TRIGGER remove_old_user
BEFORE INSERT ON userStatus
FOR EACH ROW
DELETE FROM userStatus WHERE username = NEW.username
Any ideas?