业务需要,将表中身份证字符的最后两位修改为**,测试后如下sql无误: update TABLE_NAME set idcard=CONCAT(left(idcard,CHAR_LENGTH(idcard)-2),'**')