The 6th mitzvah is that we are commanded to be close to the wise and to associate with them. We should constantly be close to them and to be with them in all possible ways of friendship, such as eating, drinking and doing business, in order to thereby succeed in emulating their actions and knowing from their words the true way of looking at things.
The source of this commandment is G‑d‘s statement (exalted be He),1 “And cling to Him.” This commandment is repeated,2 “To Him you shall cling,” and is explained in the words of the Sifri: “Cleave to the Sages and their students.”
Our Sages also derived from the verse, “To Him you shall cling,” that one must marry the daughter of a talmid chacham, marry one’s daughter to a talmid chacham, give benefits to talmidei chachamim and to do business with them. Our Sages say3 “Is it possible for a person to cling to the Divine Presence, when the verse says,4 ‘G‑d your Lord is [like] a consuming fire’?! Rather, whoever marries the daughter of a talmid chacham [is considered to have cleaved to the Divine Presence].”