A slide rail has a mounting shaft and a sliding mount. The sliding mount is movably mounted around the mounting shaft and has a clamp, a handle, a clamp jaw, a holding bracket and a spring. The clamp is mounted around the mounting shaft. The handle is rotatably connected to the clamp and has a lock bar and a grip. The clamp jaw is mounted around and abuts the mounting shaft in the clamp and has a convex surface. The holding bracket is connected to the clamp to hold a showerhead, a soap dish or the like and has a positioning ring. The spring is mounted in the clamp between the clamp jaw and the positioning ring to push the convex surface of the clamp jaw to engage an engaging recess of the lock bar.