使用mid函数即可,这里函数的用法如下:mid(字段名,起始位置,截取长度),例如:
此时查询语句是:
select mid(userIdCard,7,8) from user where id = 1;
查询结果是: