mysql常见函数传送门:
第一篇之
mysql字符函数
length concat substr instr trim upper lower lpad rpad replace
第二篇之
数学函数
round ceil floor truncate mod
第三篇之
日期函数
now curdate curtime year month monthname day hour minute
second str_to_date
date_format
第四篇之
流程控制函数
if
case
第五篇之 其他函数
其他函数:
select version() 查询数据库版本号
select database() 查询当前数据库
select user() 查询当前用户
select version() union all
select database() union all
select user()
结果:
8.0.15
yizhusancong
root@192.168.197.1