A sprinkler includes a fixed unit, a rotary unit, an impeller, a connector, and a spray head. The fixed unit has a water inlet. The rotary unit is mounted rotatably on and is fluidly communicated with the fixed unit. The impeller rotates the rotary unit and is adapted to be driven by water from the water inlet. The connector is mounted on and is fluidly communicated with the rotary unit. The spray head is mounted on and is fluidly communicated with the connector. The spray head is rotatable relative to the rotary unit so as to change an inclined position of the spray head.