The Bible teaches that God not only knows everything that will happen, He also knows everything that could potentially happen. The Bible gives several examples of this.
The Episode Of David And Saul
Scripture gives the following episode.
When David knew that Saul plotted evil against him, he said to Abiathar the priest, "Bring the ephod here." Then David said, "O Lord God of Israel, your servant has certainly heard that Saul seeks to come to Keilah to destroy the city for my sake. "Will the men of Keilah deliver me into his hand? Will Saul come down, as your servant has heard? O Lord God of Israel, I pray, tell your servant." And the Lord said, "He will come down." Then David said, "Will the men of Keilah deliver me and my men into the hand of Saul?" And the Lord said, "They will deliver you." So David and his men, about six hundred, arose and departed from Keilah and went wherever they could go. Then it was told Saul that David had escaped from Keilah; so he halted the expedition (2 Samuel 23:9-13).
Here we find a great example of God knowing all future possibilities. David and his men were in the city of Keilah. David asked the Lord what would happen if Saul came to Keilah. Would the men of Keilah deliver David and his men over to his enemy King Saul? The Lord answered with a yes. If Saul came to destroy Keilah, the men of that city would not fight. They would hand over David and his men to Saul. This is the fate that awaited David if Saul came to Keilah. Once David had that knowledge, he and his men escaped, preventing his being taken captive by Saul.
God, therefore told David about a potential event in the future that never happened. God's knowledge extends to not only actual events that will occur, but every possible event that could occur. This gives further testimony to the omniscience of God. God not only knows what actually will happen, He also knows what potentially would have happened had David remained.
David Did Not Change The Future
Some people mistakenly think that David changed the future by leaving Keilah. But this is not what the Scripture says. We do not find God saying that it was ordained that David by captured by Saul at Keilah. David did not change the future by leaving the city. God know what David's response would be and that he and his men would leave before Saul arrived. Therefore we do not find here an example of a human being changing the preordained future.
God Continued To Protect David
We find God continuing to protect David from Saul after he left the city of Keilah.
And David stayed in strongholds in the wilderness, and remained in the mountains in the Wilderness of Ziph. Saul sought him every day, but God did not deliver him into his hand (2 Samuel 23:14).
Jesus And The Cities That Did Not Repent
We find in the ministry of Jesus an example of what would have happened to the cities of Sodom and Gomorrah, and Tyre and Sidon.
Then he began to reproach the cities in which most of his deeds of power had been done, because they did not repent. "Woe to you, Chorazin! Woe to you, Bethsaida! For if the deeds of power done in you had been done in Tyre and Sidon, they would have repented long ago in sackcloth and ashes. But I tell you, on the day of judgment it will be more tolerable for Tyre and Sidon than for you. And you, Capernaum, will you be exalted to heaven? No, you will be brought down to Hades. For if the deeds of power done in you had been done in Sodom, it would have remained until this day. But I tell you that on the day of judgment it will be more tolerable for the land of Sodom than for you (Matthew 11:20-24).
In this case we have Jesus comparing the cities of Capernaum, Chorazin and Bethsaida to Sodom and Gomorrah and Tyre and Sidon. If the miracles that Jesus performed in these three cities around the Sea of Galilee would have been performed In the cities that were judged in the past – Tyre and Sidon and Sodom and Gomorrah, then these people would have repented. However, the miracles were not performed and they did not repent. This gives us an example of Jesus, God the Son, knowing what would have happened had these cities been visited by Him and His miraculous deeds. It is another example of God knowing all future possibilities.
From Scripture we discover that God knows all things that will happen and he also knows all things that may potentially happen. Biblical examples of David and Saul, as well as the Lord Jesus and the cities that did not repent, illustrate the truth of God's knowledge of all potential events.
The Lord told David that if he stayed in the city of Keilah the people of that city would hand him over to Saul. David did not stay in Keilah and Saul did not capture him.
Jesus said that the cities of Tyre, Sidon, Sodom and Gomorrah would have repented had they had seen Jesus' miracles. He knew what would have happened if the miracles would have been performed in those cities.
In each of these instances God showed his knowledge of potential events. Although these events did not happen they would have happened had circumstances been different. This illustrates the truth that God knows everything that will happen as well as everything that might happen.