码迷,mamicode.com
首页 > 数据库 > 详细

mysql 运算符和函数

时间:2019-01-10 15:47:46      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:sda   int   add   count   string   interval   val   sum   expr   

运算符:

算术运算符:+-*%/

比较运算符:>< >= <= = <>(!=)  is(not)null  between.... and  (not)in like

_ 一个字符, %零个或者多个字符

逻辑运算符: AND or not

 

数值函数:

ceil(),floor(),round(),truncate(),mod()

字符函数:

concat(s1,s2....)

concat_ws(c,s1,s2....)

lower(s)

upper(s)

length(s)

ltrim(s)

rtrim(s)

trim(s)

substring(s,pos1,length)

left(s,n)

right(s,n)

replace(s,from,to)

format(x,n)

日期时间函数:

curdate()

curtime()

now()

sysdate()

date_add(date,interval expr type)

datediff(date1,date2)

date_format(date,format)

聚合函数:

AVG(),count(), min(),max(),sum()

 

mysql 运算符和函数

标签:sda   int   add   count   string   interval   val   sum   expr   

原文地址:https://www.cnblogs.com/padingdun/p/10249746.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!