zoukankan      html  css  js  c++  java
  • MySQL数据库查询 concat 字段合并 身份证 名字手机号脱敏 case when等

    身份证号脱敏:

    CONCAT(LEFT(ui.idcard,6),'****',RIGHT(ui.idcard,4)) as 身份证号 ,

    姓名脱敏:

    CONCAT(LEFT(o.custom_name,1),'**') as 客户姓名 ,

    手机号脱敏:

    CONCAT(LEFT(o.custom_phone,3),'****',RIGHT(ui.idcard,4)) as 客户手机号,

    case when:

    case
    when c.on_time = 0 then 0
    when c.on_time = 1 THEN 1
    end as 服务时效 ,

    case when 然后合并字段:

    case
    when r1.`code` = r2.pid THEN CONCAT(r2.`name`,r3.`name`)
    ELSE CONCAT(r1.`name`,r2.`name`,r3.`name`)
    end AS 服务地点,

  • 相关阅读:
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
    【转】idea 用maven骨架生成项目速度慢的问题
  • 原文地址:https://www.cnblogs.com/mfser/p/11168972.html
Copyright © 2011-2022 走看看