学习笔记(09):MySQL数据库从入门到精通实战-MySQL常用函数讲解-02

立即学习:https://edu.csdn.net/course/play/27328/363961?utm_source=blogtoedu

聚合函数里sum,avg,min,max会忽略空值null。

case when实例:

select

    id,

    name,

    case sex

        when '男' then 'M'

        when '女' then 'F'

        else ''

    end as sex,

    salary

from emploee;

#用于查看当前用户

select user();

#对敏感数据进行加密

select md5(xxx);

发布了9 篇原创文章 · 获赞 0 · 访问量 30

猜你喜欢

转载自blog.csdn.net/weixin_47279228/article/details/105735339