2 Samuel 23:2

The spirit of the LORD spake by me, and his word was in my tongue.

The Spirit of the Lord spake by me,.... The psalms and songs he composed were not the fruits of his own genius, but were written by him under the inspiration of the Spirit of God; by whom holy men of God, the penmen of the Scriptures, spoke, even as they were moved by the Holy Ghost, of whom David was one, being a prophet; see Acts 1:16 Acts 2:30; so the Targum here,

"David spoke by the spirit of prophecy of the Lord:''

or spake "in me" {h}; what he spoke was first internally impressed upon his mind by the Spirit of God, and then he expressed it with his tongue, as follows:

and his word was in my tongue; not only the matter of his psalms was indited by the Spirit of God, and suggested to his mind; but the very words in which they are delivered were given to him, and he was directed to make use of them, and did.

{h} yb "in me", Montanus, Junius & Tremellius.