Added unique to stated. Added fetch mode to select.