MySQL数据库
1.字符函数、2.数值运算符与函数、3.比较运算符与函数、4日期时间函数、5.信息函数、6.聚合函数、7加密函数
![](https://img.haomeiwen.com/i6336964/dc0c133448e3d7d0.png)
![](https://img.haomeiwen.com/i6336964/f89db6c1cbb34ed8.png)
![](https://img.haomeiwen.com/i6336964/2583a35f6f870dab.png)
![](https://img.haomeiwen.com/i6336964/310af4af9010d313.png)
![](https://img.haomeiwen.com/i6336964/346e7c6d4d452594.png)
![](https://img.haomeiwen.com/i6336964/88bb90ecec32809a.png)
![](https://img.haomeiwen.com/i6336964/2a9a87e244bbcc63.png)
![](https://img.haomeiwen.com/i6336964/c91d95c344d8e8a7.png)
补充:
concat
select concat('imooc', ' mysql');
select concat(first_name, last_name) as full_name from test;
concat_ws
select concat_ws('|', 'A', 'B');
format
select format(12675.12, 2); -> 12,675.12
left
select left('mysql', 2); -> my
replace
select replace('??my??sql??', '?', '');
substring
mysql 字符窜中下标从1开始
like
select ‘MySQL’ like ‘M%’; -> 1
名字中有‘o’
select * from test where first_name like ‘%o%’;
名字中有‘%’
select * from test where first_name like ‘%%%’; (X)
select * from test where first_name like ‘%1%%’ escape ‘1’;
% 代表任意个字符,_代表任意一个字符。
网友评论