测试数据
SELECT
*
FROM
`userinfo`;
方式一(最推荐)
SELECT
`name` AS '姓名',
INSERT ( telephone, 4, 4, '****' ) AS '手机号',
INSERT ( cardID, 4, 11, '***********' ) AS '身份证号'
FROM
userinfo;
方式二
SELECT
`name` AS '姓名',
REPLACE ( telephone, SUBSTR( telephone, 4, 4 ), '****' ) AS '手机号',
REPLACE ( cardID, SUBSTR( cardID, 4, 11 ), '***********' ) AS '身份证号&#