The sheriffs in all the counties of this state shall have power to appoint deputies, who shall remain in office at the pleasure of such sheriffs; except that in counties which have established a merit system by ordinance, the provisions of the ordinance shall control the demotion and discharge of deputies and other employees of the sheriff’s office, except for one under-sheriff and an executive secretary, both of whom shall hold exempt positions.