当前位置:网站首页>MySQL common functions
MySQL common functions
2022-06-28 05:59:00 【Coder without code】
Be careful : The function in this article contains Chinese characters , Don't copy , Type it yourself .
1. Maximum :max
2. Round function :
round(x): Returns the closest parameter x The integer value . for example round(3.14) return 3.
round(x,y):x For input parameters ,y To reserve decimal places .y Keep to ten digits when it is negative , Bits are 0.round(123.23)
3. The average :avg
4. The absolute value :abs( Value data );
5. Substitution function :replace('abcdefg','abc','aaa'); The string ’abcdefg‘ Medium abc Replace with ’aaa'.
6.right(str,length),left(str,length), Intercept the right / The string on the left .
substring(str,pos) From pos Start intercepting a string , Until the end
substring(str,pos,length) From pos Start intercepting a string , Intercept length Characters .(pos When it's negative , It's the last to start intercepting ).
7. String connection :concat('sss','aaa') take sss Same as aaa Connect . There are null When to return to null.
concat_ws(‘,’,‘aaa’,'sss'). The first string is the delimiter , The result is ‘aaa,sss’.
8. To string :
cast('132' as signed) CONVERT('123',SIGNED); To int.
Available types
Binary system , Syntaxis binary The effect of prefixes : BINARYCharacter , With parameters : CHAR()
date : DATE
Time : TIME
Date time type : DATETIME
Floating point numbers : DECIMAL
Integers : SIGNED
Unsigned integer : UNSIGNED
边栏推荐
- JQ picture amplifier
- ES9023音频解码芯片的工作原理
- Main functions of 5ggnb and ng ENB
- Ethereum Classic的难度计算|猿创征文
- 5g network overall architecture
- Filecoin hacker song developer competition
- Official answers to the "network security" competition questions of the 2022 national vocational college skills competition
- Jenkins continues integration 2
- Prime mover × Cloud primordial is making sound, reducing cost and increasing efficiency lecture hall
- Lenovo hybrid cloud Lenovo xcloud, new enterprise IT service portal
猜你喜欢

Binder interview: memory management unit

socke.io长连接实现推送、版本控制、实时活跃用户量统计

联想混合云Lenovo xCloud,新企业IT服务门户

上海域格ASR CAT1 4g模块2路保活低功耗4G应用

Apple MDM bypass jailfree bypass MDM configuration lock free

6. 毕业设计温湿度监控系统(ESP8266 + DHT11 +OLED 实时上传温湿度数据给公网服务器并在OLED显示屏上显示实时温湿度)

How popular are FB and WhatsApp mass messages in 2022?

Oracle fundamentals summary

Jenkins continues integration 2

容量调度绝对值配置队列使用与避坑
随机推荐
Relevant implementation records of CSI and local disk
使用SQL select count distinct查询语句统计数据库中某个字段的唯一值总数量
Codeworks 5 questions per day (1700 for each)
How to add live chat in your Shopify store?
Qtcanpool q05: no border
函数栈帧的创建和销毁
使用SSM框架,配置多个数据库连接
Data middle office: six questions data middle office
numpy. reshape, numpy. Understanding of transfer
socke.io长连接实现推送、版本控制、实时活跃用户量统计
Data warehouse: DWS layer design principle
Video tutorial on website operation to achieve SEO operation [21 lectures]
Oracle fundamentals summary
1404. 将二进制表示减到1的步骤数
Typescript interface
Example of MVVM framework based on kotlin+jetpack
windows上安装redis并永久修改密码,及ssm框架集成redis
Binder interview: memory management unit
什么是WebRTC?
Yygh-8-appointment registration