Every person elected or appointed to any office in this state, except such inferior offices as may be by law exempted, shall, before entering upon the duties thereof, take an oath or affirmation to support the Constitution of the United States and of this state, and faithfully to discharge the duties of his office.