All the commanders and warriors, and also all the other sons of King David, swore allegiance to King Solomon.