Matthew Henry on 2 Samuel 12:26–end
We have here an account of the conquest of Rabbah, and other cities of the Ammonites. Though this comes in here after the birth of David's child, yet it is most probable that it was effected a good while before, and soon after the death of Uriah, perhaps during the days of Bath-sheba's mourning for him. Observe, 1. That God was very gracious in giving David this great success against his enemies, notwithstanding the sin he had been guilty of just at that time when he was engaged in this war, and the wicked use he had made of the sword of the children of Ammon in the murder of Uriah. Justly might he have made that sword, thenceforward, a plague to David and his kingdom; yet he breaks it, and…
Read the whole note in the consoleJamieson-Fausset-Brown on 2 Samuel 12:26
RABBAH IS TAKEN. (Sa2 12:26-31)
Joab fought against Rabbah--The time during which this siege lasted, since the intercourse with Bath-sheba, and the birth of at least one child, if not two, occurred during the progress of it, probably extended over two years.
Adam Clarke on 2 Samuel 12:26
And took the royal city - How can this be, when Joab sent to David to come to take the city, in consequence of which David did come and take that city? The explanation seems to be this: Rabbah was composed of a city and citadel; the former, in which was the king's residence, Joab had taken, and supposed he could soon render himself master of the latter, and therefore sends to David to come and take it, lest, he taking the whole, the city should be called after his name.
John Gill on 2 Samuel 12:26
And Joab fought against Rabbah of the children of Ammon,.... Of his being sent against it, and of his besieging it, we read in 2 Samuel 11:1; but it can hardly be thought that he had been so long besieging it, as that David had two children by Bathsheba; but the account of the finishing of it is placed here, that the story concerning Bathsheba might lie together without any interruption:
and took the royal city; or that part of it in which the king's palace was, and which, as Abarbinel observes, was without the city, as the palaces of kings now usually are.