Dear Student,
Mercury does not stick to glass whereas water sticks to the glass surface.
In water the cohesive force is weaker than the adhesive force exerted by the molecules of glass,hence it wets glass while in mercury the cohesive force is stronger than the adhesive force of glass,hence it does not sticks to glass and as a result does not wets it.
Regards