1 Chronicles 11:10-47 These were the chiefs of David's mighty warriors - they, together with all Israel, gave his kingship strong support to extend it over the whole land, as the LORD had promised - this is the list of David's mighty warriors:
Jashobeam, a Hakmonite, was chief of the officers; he raised his spear against three hundred men, whom he killed in one encounter.
Next to him was Eleazar son of Dodai the Ahohite, one of the three mighty warriors. He was with David at Pas Dammim when the Philistines gathered there for battle. At a place where there was a field full of barley, the troops fled from the Philistines. But they took their stand in the middle of the field. They defended it and struck the Philistines down, and the LORD brought about a great victory.
Three of the thirty chiefs came down to David to the rock at the cave of Adullam, while a band of Philistines was encamped in the Valley of Rephaim. At that time David was in the stronghold, and the Philistine garrison was at Bethlehem. David longed for water and said, "Oh, that someone would get me a drink of water from the well near the gate of Bethlehem!" So the Three broke through the Philistine lines, drew water from the well near the gate of Bethlehem and carried it back to David. But he refused to drink it; instead, he poured it out to the LORD. "God forbid that I should do this!" he said. "Should I drink the blood of these men who went at the risk of their lives?" Because they risked their lives to bring it back, David would not drink it. Such were the exploits of the three mighty warriors.
Abishai the brother of Joab was chief of the Three. He raised his spear against three hundred men, whom he killed, and so he became as famous as the Three. He was doubly honoured above the Three and became their commander, even though he was not included among them.
Benaiah son of Jehoiada, a valiant fighter from Kabzeel, performed great exploits. He struck down Moab's two mightiest warriors. He also went down into a pit on a snowy day and killed a lion. And he struck down an Egyptian who was five cubits tall. Although the Egyptian had a spear like a weaver's rod in his hand, Benaiah went against him with a club. He snatched the spear from the Egyptian's hand and killed him with his own spear. Such were the exploits of Benaiah son of Jehoiada; he too was as famous as the three mighty warriors. He was held in greater honour than any of the Thirty, but he was not included among the Three. And David put him in charge of his bodyguard.
The mighty warriors were:
Asahel the brother of Joab,
Elhanan son of Dodo from Bethlehem,
Shammoth the Harorite,
Helez the Pelonite,
Ira son of Ikkesh from Tekoa,
Abiezer from Anathoth,
Sibbekai the Hushathite,
Ilai the Ahohite,
Maharai the Netophathite,
Heled son of Baanah the Netophathite,
Ithai son of Ribai from Gibeah in Benjamin,
Benaiah the Pirathonite,
Hurai from the ravines of Gaash,
Abiel the Arbathite,
Azmaveth the Baharumite
Eliahba the Shaalbonite,
the sons of Hashem the Gizonite,
Jonathan son of Shagee the Hararite,
Ahiam son of Sakar the Hararite,
Eliphal son of Ur,
Hepher the Mekerathite,
Ahijah the Pelonite,
Hezro the Carmelite,
Naarai son of Ezbai,
Joel the brother of Nathan,
Mibhar son of Hagri,
Zelek the Ammonite,
Naharai the Berothite, the armour-bearer of Joab son of Zeruiah,
Ira the Ithrite,
Gareb the Ithrite,
Uriah the Hittite,
Zabad son of Ahlai,
Adina son of Shiza the Reubenite, who was chief of the Reubenites, and the thirty with him,
Hanan son of Maakah,
Joshaphat the Mithnite,
Uzzia the Ashterathite,
Shama
and Jeiel the sons of Hotham the Aroerite,
Jediael son of Shimri,
his brother Joha the Tizite,
Eliel the Mahavite,
Jeribai and Joshaviah the sons of Elnaam,
Ithmah the Moabite,
Eliel,
Obed
and Jaasiel the Mezobaite.
2 Samuel 23:8-39
These are the names of David's mighty warriors:
Josheb-Basshebeth, a Tahkemonite, was chief of the Three; he raised his spear against eight hundred men, whom he killed in one encounter.
Next to him was Eleazar son of Dodai the Ahohite. As one of the three mighty warriors, he was with David when they taunted the Philistines gathered at Pas Dammim for battle. Then the Israelites retreated, but Eleazar stood his ground and struck down the Philistines till his hand grew tired and froze to the sword. The LORD brought about a great victory that day. The troops returned to Eleazar, but only to strip the dead.
Next to him was Shammah son of Agee the Hararite. When the Philistines banded together at a place where there was a field full of lentils, Israel's troops fled from them. But Shammah took his stand in the middle of the field. He defended it and struck the Philistines down, and the LORD brought about a great victory.
During harvest time, three of the thirty chief warriors came down to David at the cave of Adullam, while a band of Philistines was encamped in the Valley of Rephaim. At that time David was in the stronghold, and the Philistine garrison was at Bethlehem. David longed for water and said, "Oh, that someone would get me a drink of water from the well near the gate of Bethlehem!" So the three mighty warriors broke through the Philistine lines, drew water from the well near the gate of Bethlehem and carried it back to David. But he refused to drink it; instead, he poured it out before the LORD. "Far be it from me, LORD, to do this!" he said. "Is it not the blood of men who went at the risk of their lives?" And David would not drink it. Such were the exploits of the three mighty warriors.
Abishai the brother of Joab son of Zeruiah was chief of the Three. He raised his spear against three hundred men, whom he killed, and so he became as famous as the Three. Was he not held in greater honour than the Three? He became their commander, even though he was not included among them.
Benaiah son of Jehoiada, a valiant fighter from Kabzeel, performed great exploits. He struck down Moab's two mightiest warriors. He also went down into a pit on a snowy day and killed a lion. And he struck down a huge Egyptian. Although the Egyptian had a spear in his hand, Benaiah went against him with a club. He snatched the spear from the Egyptian's hand and killed him with his own spear. Such were the exploits of Benaiah son of Jehoiada; he too was as famous as the three mighty warriors. He was held in greater honour than any of the Thirty, but he was not included among the Three. And David put him in charge of his bodyguard.
Among the Thirty were:
Asahel the brother of Joab,
Elhanan son of Dodo from Bethlehem,
Shammah the Harodite,
Elika the Harodite,
Helez the Paltite,
Ira son of Ikkesh from Tekoa,
Abiezer from Anathoth
Sibbekai the Hushathite,
Zalmon the Ahohite,
Maharai the Netophathite,
Heled son of Baanah the Netophathite,
Ithai son of Ribai from Gibeah in Benjamin,
Benaiah the Pirathonite,
Hiddai from the ravines of Gaash,
Abi-Albon the Arbathite,
Azmaveth the Barhumite,
Eliahba the Shaalbonite
the sons of Jashen,
Jonathan son of Shammah the Hararite,
Ahiam son of Sharar the Hararite,
Eliphelet son of Ahasbai the Maakathite,
Eliam son of Ahithophel the Gilonite,
Hezro the Carmelite,
Paarai the Arbite,
Igal son of Nathan from Zobah,
the son of Hagri,
Zelek the Ammonite,
Naharai the Beerothite, the armour-bearer of Joab son of Zeruiah,
Ira the Ithrite,
Gareb the Ithrite
and Uriah the Hittite.
There were thirty-seven in all.
The list in 1 Chronicles appears to be prior to the one in 2 Samuel at the end of David's life. This explains the 2 Samuel list being shorter and perhaps other apparent discrepancies. The exact thirty clearly changed over the years.