A wise man has no extensive knowledge; He who has extensive knowledge is not a wise man. [Lao-tzu, "Tao te Ching," c.550 B.C.E.]
Wise guy is attested from 1896, American English. Wisenheimer, with mock German or Yiddish surname suffix, first recorded 1904.
Haddywyst comyth euer to late Whan lewyd woordis beth owte y-spronge. ["Commonplace book" in Trinity College, Cambridge, c.1500]
A witty saying proves nothing. [Voltaire, Diner du Comte de Boulainvilliers]