第三章:数据查询语言DQL-MySQL常用函数讲解

直接学习:https://edu.csdn.net/course/play/27328/363961
MySQL常用函数讲解:
1、MySQL函数指的是MySQL数据库提供的内置函数,包括数字函数,字符串函数,日期和时间函数,聚合函数,条件判断函数等。
时间函数now();
#select now();
聚合函数
#select count(*) from employee;
#select sum(salary) from employee;
#select avg(salary) from employee;
#select max(salary) from employee;
#select min(salary) from employee;
#select
id,
name,
case sex
when ‘男’ then ‘F’
when ‘女’ then ‘M’
end as sex,
salary
from employee;
#select md5(‘zhangsan’);

发布了107 篇原创文章 · 获赞 6 · 访问量 968

猜你喜欢

转载自blog.csdn.net/weixin_43597208/article/details/105444044