וַהֲדַ֞ד שָׁמַ֣ע בְּמִצְרַ֗יִם כִּֽי־שָׁכַ֤ב דָּוִד֙ עִם־אֲבֹתָ֔יו וְכִי־מֵ֖ת יוֹאָ֣ב שַֽׂר־הַצָּבָ֑א וַיֹּ֤אמֶר הֲדַד֙ אֶל־פַּרְעֹ֔ה שַׁלְּחֵ֖נִי וְאֵלֵ֥ךְ אֶל־אַרְצִֽי׃
Als nun Hadad in Ägypten hörte dass David sich zu seinen Vätern gelegt habe, und dass der Heerführer Joab gestorben sei, da sprach Hadad zu Pharao: Entlasse mich, dass ich nach meinem Lande zurückkehre.
Rashi
That Dovid slept. For Dovid who died of natural causes, an expression of sleeping [שכיבה] is mentioned; but for Yoav who was killed, an expression of dying [מיתה] is mentioned.. Another explanation is that concerning Dovid who was survived by a meritorious son who took his place, [an expression of] sleeping is mentioned, but concerning Yoav who was not survived by a meritorious son who took his place, [an expression of] sleeping is not mentioned, rather, [an expression of] dying [is mentioned].7Maseches Bava Basra 116a.