SELECT *,INSTR(a.accessNu,'e'),SUBSTR(a.accessNu,1,1)FROM `a1to2` a SELECT id,REPLACE(a.id,'-','') FROM `a1to2` a