I recently answered what I thought was a quite simple question. The answer was upvoted, but not accepted, and it was the only answer to the question. To my surprise, I realized that I had read the question a little too fast, and that my answer was just plain wrong. I did delete the answer, but I am wondering if that was the best course of action. Would it have been better to leave the answer, with a disclaimer that it was completely wrong? I figure others also had the same answer as me ready, as I got upvoted, and plainly writing that the answer was wrong, and why, might have saved others from doing the same mistake.
So is it ever a good idea to leave an incorrect answer, with a disclaimer, instead of deleting it?
It should also be said that editing the answer to give a correct answer was not an option, as I wasn't able to figure out what the real problem was...