Some trust in chariots, and some in horses; but we will remember the name of the LORD our God. They have bowed down and fallen; but we have risen and stand upright. Save, LORD! May the King answer us when we call.
King David was a valiant warrior, but he placed his real confidence in God. He had experienced victories over those who trusted in superior military equipment and power (see 2 Samuel 8:4, for example).
David also recognized that he was not the ultimate king. He prayed to the King of the universe for deliverance. Read more about this kind of faith in “Spiritual Warfare: How to Win and How to Lose.”
Though God blessed David in battle, it was not God’s original intention that His people fight in wars. For more on this, see “War in the Bible: Why Did God’s People Go to War?”