Joab sent David a full account of the battle.
He instructed the messenger: "When you have finished giving the king this account of the battle,
the king's anger may flare up, and he may ask you, 'Why did you get so close to the city to fight? Didn't you know they would shoot arrows from the wall?
Who killed Abimelech1 son of Jerub-Besheth ? Didn't a woman throw an upper millstone on him from the wall,2 so that he died in Thebez? Why did you get so close to the wall?' If he asks you this, then say to him, 'Also, your servant Uriah the Hittite is dead.' "
References for 2 Samuel 11:21
The messenger set out, and when he arrived he told David everything Joab had sent him to say.
The messenger said to David, "The men overpowered us and came out against us in the open, but we drove them back to the entrance to the city gate.
Then the archers shot arrows at your servants from the wall, and some of the king's men died. Moreover, your servant Uriah the Hittite is dead."
David told the messenger, "Say this to Joab: 'Don't let this upset you; the sword devours one as well as another. Press the attack against the city and destroy it.' Say this to encourage Joab."
When Uriah's wife heard that her husband was dead, she mourned for him.
After the time of mourning3 was over, David had her brought to his house, and she became his wife and bore him a son. But the thing David had done displeased4 the LORD.
References for 2 Samuel 11:27