2 Samuel 6:23 "Therefore Michal the daughter of Saul had no child unto the day of her death."
2 Samuel 21:8 "But the king took the two sons of Rizpah the daughter of Aiah, whom she bare unto Saul, Armoni and Mephibosheth; and the five sons of Michal the daughter of Saul, whom she brought up for Adriel the son of Barzillai the Meholathite:"
This contradiction between the references in 2 Samuel is caused by a textual problem. Since the understanding of both passages is clear and possible without problems, the difficulty must have to do in some way with the text itself and how it has been passed on, or else there must be a problem in translation.
Some modern Bibles actually have already corrected this problem, and they do not have the word "Michal" in the verse in 2 Samuel 21:8, but rather the word "Merab". Some codices which are also mentioned in the Massorah, as well as the Septuagint and the Aramaic texts do have the word "Merab" for "Michal" in this passage.
That "Merab" is the correct word becomes clear from another passage in 1 Samuel 18:19, where Adriel and his wife are also mentioned. There it says, "But it came to pass at the time when Merab Saul's daughter should have been given to David, that she was given unto Adriel the Meholathite to wife."
The context and the observation of the other verses where the same persons are mentioned helps clarify this apparent contradiction which is seen in some translations. Michal, the daughter of Saul, had no children; Merab, another daughter of Saul, had at least five sons which are mentioned in the Scriptures.