It wasn’t the first time a Hebrew king had killed a man for something he wanted, but Ahab’s response was very different to that of David.
David listened to the prophet who delivered God’s rebuke (Nathan); Ahab called the prophet who delivered the bad news his ‘enemy’:
1 Kings 21:20 ‘So, my enemy, you have found me!’ Ahab exclaimed to Elijah. ‘Yes’, Elijah answered, ‘I have come because you have sold yourself to what is evil in the Lord’s sight.’
David wrote Psalm 51 (and meant it), and the whole incident was the only one recorded as David not obeying the Lord.
Ahab appeared to repent:
1 Kings 21:27 But when Ahab heard this message, he tore his clothing, dressed in burlap, and fasted. He even slept in burlap and went about in deep mourning.
And got a reprieve from God:
1 Kings 21:29Do you see how Ahab has humbled himself before me? Because he has done this, I will not do what I promised during his lifetime. It will happen to his sons; I will destroy his dynasty.
It’s what didn’t come next that shows the difference.
In deciding whether to wage war against Aram, Ahab asked for advice from a group of 400 false prophets (not prophets of the Lord) for direction, and actively avoided any ‘true’ prophet until he was forced to in his alliance with Jehoshaphat:
1 Kings 22:7 But Jehoshaphat asked, ‘Is there not also a prophet of the Lord here? We should ask him the same question.’ [Ahab] replied, ‘There is one more man who could consult the Lord for us, but I hate him. He never prophesies anything but trouble for me! His name is Micaiah son of Imlah.’
Elijah didn’t even get a mention−he was obviously even worse than Micaiah in Ahab’s opinion.
What is missing is any sign of Ahab recognising the reprieve as an opportunity for further repentance. Instead, prophets of the Lord are declared his hated enemies.