When a defendant is prosecuted by a fictitious name, and in any stage of the proceedings his true name is discovered, it must be inserted in the subsequent proceedings, with reference to the fact that he was prosecuted by the name mentioned in the indictment, information, or complaint. When a defendant is prosecuted by an erroneous name, and in any stage of the proceedings his correct name is discovered, it must be inserted in the subsequent proceedings without reference to the fact that he was prosecuted by any other name.
SDCL 23A-6-20