当前位置:网站首页>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
边栏推荐
- 使用SSM框架,配置多个数据库连接
- Taobao seo training video course [22 lectures]
- What are the advantages of e-mail marketing? Why do sellers of shopline independent station attach so much importance to it?
- 脚本语言和编程语言
- Yygh-6-wechat login
- 原动力×云原生正发声 降本增效大讲堂
- 上海域格ASR CAT1 4g模块2路保活低功耗4G应用
- 函数栈帧的创建和销毁
- Ape pink ape power - Developer activity attack!
- socke.io长连接实现推送、版本控制、实时活跃用户量统计
猜你喜欢

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

YYGH-BUG-02

Use of JDBC
![[C language practice - printing hollow square and its deformation]](/img/59/9122a6c8437f12bc28c97304ba9787.png)
[C language practice - printing hollow square and its deformation]

cocoapod中的第三方库怎么引用本地头文件

YYGH-BUG-03

Openharmony gnawing paper growth plan -- json-rpc

Binder interview: memory management unit

Valueerror: iterative over raw text documents expected, string object received

Sharing tips for efficient scripting
随机推荐
File foundation - read / write, storage
不会还有人只会用forEach遍历数组吧?
Bidirectional level conversion circuit
PKG package node project (express)
Typescript interface
Common basic functions of Oracle
Jenkins持续集成1
Apple MDM Bypass 免越狱绕过MDM配置锁 免费
Capacity scheduling absolute value configuration queue usage and pit avoidance
[untitled]
Valueerror: iterative over raw text documents expected, string object received
Filecoin hacker song developer competition
使用SQL select count distinct查询语句统计数据库中某个字段的唯一值总数量
Working principle of es9023 audio decoding chip
原动力×云原生正发声 降本增效大讲堂
Mosaic data enhanced mosaic
Qtcanpool q05: no border
【MYSQL】所有查询表中有2千万数据--sql如何优化
socke.io长连接实现推送、版本控制、实时活跃用户量统计
2022年全国职业院校技能大赛“网络安全”竞赛试题官方答案