وَمَا أَدْرِ‌ي مَا يُفْعَلُ بِي وَلَا بِكُمْ ۖ إِنْ أَتَّبِعُ إِلَّا مَا يُوحَىٰ إِلَيَّ (and I do not know what will be done to me or to you. I do not follow anything but what is revealed to me - 46:9) The sentence, "I do not follow anything but what is revealed to me," has been used here as an 'exception' to the previous sentence, meaning thereby that I do not know anything except what is revealed to me through wahy. The gist of the explanation given to this verse by Imam Dahhak (رح) is that the knowledge of some unseen things can be obtained by the Holy Prophet ﷺ only through wahy, and he does not have any knowledge about those unseen things which were not revealed to him through wahy, be they about his own self, about the believers and disbelievers among his people, or about matters pertaining to this world or to the Hereafter. Whatever the Holy Prophet ﷺ has said about the unseen things is obtained through wahy. The noble Qur'an has declared that the Holy Prophet ﷺ was blessed by the knowledge of innumerable things from the Unseen (ghaib), but all this knowledge was given to him by the divine revelation. This is exactly what the Holy Qur'an means by saying,

تِلْكَ مِنْ أَنبَاءِ الْغَيْبِ نُوحِيهَا إِلَيْكَ

"These are some reports from the unseen (events) which We reveal to you." (11: 49)

Details of matters relating to the Hereafter, Hell, Paradise, accountability, reward and punishment are given in the Holy Qur'an itself, and many details of certain future events that had to take place in this world are given in authentic ahadith reported from the Holy Prophet ﷺ . Thus the substance of the present verse is simply that the knowledge of the Holy Prophet ﷺ about the Unseen is not all-encompassing as is that of Allah Almighty, nor is it independently obtained; he simply reproduces whatever Allah Almighty tells him through wahy.

After having reproduced this explanation, the author of Ruh-ul-Ma’ ani says, "It is my belief that the Holy Prophet ﷺ did not leave this world until he was blessed by wahy with such a knowledge about Allah Ta’ ala, His attributes and about all those things the knowledge of which could be meritorious that no other in the whole universe has ever been blessed with. But I do not believe that unawareness about trivial worldly affairs like the acts of some particular individuals and what they do at their homes and what happens to them one day or the other can in any way reduce his excellence."

Dictate of etiquette regarding the knowledge of the Holy Prophet t about unseen matters

Respect for the Holy Prophet ﷺ demands that one should not say that he did not know the Unseen; rather one should say that Allah Ta` a1a had given such vast knowledge of unseen matters to him as was not given to any other prophet.

The explanation given by some exegetes that the negation in this verse is only about the unseen affairs pertaining to this world, and not about the Hereafter (as stated by Qurtubi) is probably because they have not taken the words, "I do not follow anything but what is revealed to me," in the sense of an exception to the previous sentence; hence the negation of the knowledge of unseen things has been made specific to the affairs of this world, because the Holy Prophet ﷺ has told very clearly about the Hereafter that the Mu'min would go to Paradise, and the 'kafir' would go to Hell.