Suppose I answer a question, and it later gets closed as a duplicate. Should I delete my answer (perhaps copying any unique bits to a new comment or answer to the other question), edit my answer to include information from the other question's best answer, or leave my answer as-is?
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
I would just leave it as is. Duplicates are not necessarily bad and if your answer fits the question, there's no need to remove it. You would only end up starving the duplicate.
If anything, the questions could be merged completely (rather than users "merging" individual answers), but if that doesn't happen, I would leave things as they are. Just my (rapidly devaluing) two cents.
If it's already covered by the other answers, you can delete it, but there's no compulsion to do so. If you have some unique points not in the others, it's OK to delete-then-copy-it-over-as-an-answer. I think individual answers can be migrated, so you can flag it and request migration for a smoother experience. Whole questions can certainly be merged, though.
Don't go to trigger-happy on deletion. Deletion is supposed to be for bad/wrong content. Really, there's nothing wrong with leaving it as it is.
I often perform a search to a certain problem and end up using the answer provided at a closed question!
Due to the nature of specific problems, some questions may be closed as exact duplicates but the provided answers can give readers alternative ways to solve the issue!
After all, the question may be closed, but the normal flow depends on the reputation. If enough up votes are given to a certain closed question (and/or the answers given), the moderators will be taking some actions as merging the two questions (e.g.).
On the other hand, if the closed question (and/or the answers given), gets down voted, it will get automatically delete!
You can read more about this:
Do closed questions ever get deleted? that explains what happens to the closed question if it is poor!
Here the The Stack Overflow Question Lifecycle. that better illustrates how does the question survives or not!
And one joint explanation of what is a closed question where we are encouraged to salvage it or wait until the community moves it to the next stage deletion .
Do not delete your answer, if has up votes, the comunity trusts it and you! The same community will deal by the means of up vote / down vote, with the "closed question" factor.
That will not be 100% necessary as no Two Answers are exact same. A line of code may be same but the explanation might different. So i would suggest you to leave it as it is.