An oracle about the wicked came to David’s heart. An oracle is a command or revelation from God through the works of the Holy Spirit. Those anointed with the Spirit of God are in communion with God Almighty. Among other things, God speaks to those he is in communion with usually within our soul; that is the mind and heart. David was anointed by the prophet Samuel. This is when the Spirit of God first entered David.
Was David meditating on the word of God when God revealed a truth about the wicked? (The first six books of the Bible were the only ones written in David’s time.) Perhaps David was thinking about a particular person’s actions when this oracle came to him. Was David pondering why King Saul, a man also anointed by Samuel was dealing with him in such an evil manner? Maybe, David was considering if he was any different than Saul. An oracle from God may or may not have actions that precipitate it. David probably was considering Saul and the sinful nature of the human heart.
The revelation concerning the sinfulness of the wicked is this, “There is no fear of God before his eyes.” This key difference separates the righteous and the wicked even if they are both anointed. The righteous fear the Lord God and the wicked have no dread of God before his eyes. The Apostle Paul used this fact to conclude the truth that all are alike under sin; no matter race, age, social place, gender, or location. (Romans 3:9, 16)