A switch, comprising: a housing; and a metal terminal that is insert-molded into the housing, the metal terminal including a contact portion provided on a first side of the metal terminal, an external connection portion provided on a second side of the metal terminal, and an embedded portion provided between the contact portion and the external connection portion and embedded in the housing, wherein the embedded portion extends in a leftward-and-rightward direction that is an extending direction and in a forward-and-backward direction that is a widthwise direction, wherein in the embedded portion, groove portions are formed in a front surface of the metal terminal and a rear surface of the metal terminal, the groove portions in the front surface being formed at positions different from the groove portions in the rear surface, the groove portions extend in the widthwise direction that is a direction intersecting the extending direction of the embedded portion, and the groove portions are alternately formed in the front surface and in the rear surface, wherein the embedded portion includes a narrow-width portion that is partially narrow in width, and the groove portions are formed in the narrow-width portion, and wherein the groove portions have a length in the forward-and-backward direction that is the same as the width of the narrow-width-portion. a housing; and a metal terminal that is insert-molded into the housing, the metal terminal including a contact portion provided on a first side of the metal terminal, an external connection portion provided on a second side of the metal terminal, and an embedded portion provided between the contact portion and the external connection portion and embedded in the housing, wherein the embedded portion extends in a leftward-and-rightward direction that is an extending direction and in a forward-and-backward direction that is a widthwise direction, wherein in the embedded portion, groove portions are formed in a front surface of the metal terminal and a rear surface of the metal terminal, the groove portions in the front surface being formed at positions different from the groove portions in the rear surface, the groove portions extend in the widthwise direction that is a direction intersecting the extending direction of the embedded portion, and the groove portions are alternately formed in the front surface and in the rear surface, wherein the embedded portion includes a narrow-width portion that is partially narrow in width, and the groove portions are formed in the narrow-width portion, and wherein the groove portions have a length in the forward-and-backward direction that is the same as the width of the narrow-width-portion. a contact portion provided on a first side of the metal terminal, an external connection portion provided on a second side of the metal terminal, and an embedded portion provided between the contact portion and the external connection portion and embedded in the housing, wherein the embedded portion extends in a leftward-and-rightward direction that is an extending direction and in a forward-and-backward direction that is a widthwise direction, wherein in the embedded portion, groove portions are formed in a front surface of the metal terminal and a rear surface of the metal terminal, the groove portions in the front surface being formed at positions different from the groove portions in the rear surface, the groove portions extend in the widthwise direction that is a direction intersecting the extending direction of the embedded portion, and the groove portions are alternately formed in the front surface and in the rear surface, groove portions are formed in a front surface of the metal terminal and a rear surface of the metal terminal, the groove portions in the front surface being formed at positions different from the groove portions in the rear surface, the groove portions extend in the widthwise direction that is a direction intersecting the extending direction of the embedded portion, and the groove portions are alternately formed in the front surface and in the rear surface, wherein the embedded portion includes a narrow-width portion that is partially narrow in width, and the groove portions are formed in the narrow-width portion, and wherein the groove portions have a length in the forward-and-backward direction that is the same as the width of the narrow-width-portion.