mysql的系统函数分类(基本的五大类)
字符串系统函数
1、now()函数 获取系统当前时间戳。
2、concat() mysql的字符拼接函数
select concat('hello','world');
运行结果 hello world
select concat('name','_','age') from student
运行结果 name_age
3、trim() 去除字符串的空白字符与PHP一样。
4、Upper() 返回的字母都是大写
select upper('Mysql');
结果是 MYSQL
5、 lower() 返回的字母都是小写。
select lower('Mysql');
结果是 mysql
6、 char_length() 返回字符的长度
select char_length('我爱中国');
结果是

本文介绍了MySQL的系统函数,主要包括字符串、IP地址、日期、数学和其他五大类。字符串函数如now()、concat()、trim()等;IP地址函数如inet_aton()、inet_ntoa();日期函数如curtime()、datediff()、date_add()等;数学函数如abs()、ceiling()、rand()等;以及其他函数如md5()、password()、version()等。
最低0.47元/天 解锁文章
4423

被折叠的 条评论
为什么被折叠?



