当前位置:Gxlcms > 数据库问题 > mysql 常用函数

mysql 常用函数

时间:2021-07-01 10:21:17 帮助过:26人阅读

1.字符串函数

技术分享

2.数值函数

技术分享

3.日期函数

 技术分享

DATE_FORMAT(date,fmt)函数:按字符串fmt 格式化日期date 值,此函数能够按指定的格式显示日期

技术分享

技术分享

4.流程函数

 技术分享

举例如下

mysql> select if(salary>2000,‘high‘,‘low‘) from salary;

mysql> select ifnull(salary,0) from salary;

mysql> select case salary when 1000 then ‘low‘ when 2000 then ‘mid‘ else ‘high‘ end from salary;

 5.其他函数

技术分享

 

mysql 常用函数

标签:技术分享   nbsp   显示日期   img   image   from   指定   sel   格式化   

人气教程排行