Omniscience is the ability to know everything and is usually believed to be an attribute of God although there have been religious leaders who have claimed to be omniscient too.
The Buddha said that no being, human or divine, could be all-knowing. He denied that God is omniscient (D.I,17,) for if he were religion would become meaningless. If God knows everything, he must know how we are going to act long before we do, which means that we have no freedom to act otherwise. And if we have no freedom to choose how we are going to act, what is the point of teaching people to be good and to avoid evil? Mahàvãra, the founder of Jainism, and a contemporary of the Buddha, claimed to be omniscient (M.II,31), a claim which the Buddha said was without foundation (M.II,127).
Interestingly, in the centuries since his passing some unlearned and over-enthusiastic Buddhists have claimed that the Buddha ‘knows everything that has been seen, heard, sensed, thought, attained, sought and searched by the minds of those who inhabit the entire world of gods and humans.’ Although the Buddha never made this claim for himself, he did say he was ‘one who knows the worlds’ (lokavidå).