John Gill's Exposition of the Whole Bible
Psalms 119:98
Thou through thy commandments hast made me wiser than mine enemies,.... David had his enemies, as every good man has: and these are often cunning and crafty ones, at least in wickedness; many of them are wise and prudent as to natural things, wiser in worldly things and political matters than the children of light, and often lay deep schemes and take crafty counsel against the saints; and yet they, by attending to the word and commands of God, and being under his direction and counsel, counterwork the designs of their enemies, and overturn their schemes and measures, which are brought to confusion; honesty being in the issue the best policy. However, the people of God are wiser than they in the best things; in the affair of salvation; in things relating to a future state, and their happiness there; which wisdom they attain unto through the Word of God, which is written for their learning; through the Scriptures, which are able to make men wise to salvation: these are the means, and no more; for it is God that is the efficient cause, or makes the means effectual, to make them wise, and wiser than others; it is owing to his divine teachings, to his Spirit and grace. The words may be rendered, "it hath made me wiser in thy commandments than mine enemies" d; that is, the law; and so is another reason why it was so greatly loved by him: or, "thy commandments", that is, everyone of thy commandments, "have made me wiser", c. e. Joseph Kimchi give, this as the sense,
"by mine enemies thou hast made me wise f thou hast learned me thy commandments, so that I see they cannot remove thy law from my mouth;''
for they [are] ever with me; that is, the commandments of God, or his law, and the precepts of it; they were his privy counsellors, with whom on all occasions he consulted, and so became wiser than his enemies, and outwitted them: these were always near him, in his heart and in his mouth; he was ever thinking and speaking of them, and so did not forget the instructions they gave him; they were ever before his eyes, as the rule of his conduct.
d So Junius Tremellius. e So Cocceius, Muis, Gejerus and the Targum. f "Fas est et ab hoste doceri", Ovid.