Reference: Siyar A’laam an-Nubalaa – Volume 14, Page 370
On the authority of Ibn Khuzaymah, who was asked:
From where did you come by [this] knowledge?
So he responded: The Messenger of Allaah (sal-Allaahu ‘alayhi wa sallam) said:
«The water of Zam-Zam is what it is drunk for»
And certainly, when I drunk [it] I asked Allaah for beneficial knowledge.