当前位置:网站首页>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框架,配置多个数据库连接
- Typescript base type
- 2022年全国职业院校技能大赛“网络安全”竞赛试题官方答案
- JSP
- Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
- High quality domestic stereo codec cjc8988, pin to pin replaces wm8988
- Independent station sellers are using the five e-mail marketing skills, do you know?
- 密码学笔记
- Lenovo hybrid cloud Lenovo xcloud, new enterprise IT service portal
- pytorch详解
猜你喜欢
19 fonctions de perte d'apprentissage profond
socke.io长连接实现推送、版本控制、实时活跃用户量统计
Common basic functions of Oracle
Prime mover × Cloud primordial is making sound, reducing cost and increasing efficiency lecture hall
What is the e-commerce conversion rate so abstract?
Apple MDM bypass jailfree bypass MDM configuration lock free
What is webrtc?
How to add live chat in your Shopify store?
开发者的时代红利在哪里?
Binder interview: memory management unit
随机推荐
Shanghai Yuge ASR CAT1 4G module 2-way low power 4G application
数据仓库:DWS层设计原则
Valueerror: iterative over raw text documents expected, string object received
Mysql-17- create and manage tables
联想混合云Lenovo xCloud,新企业IT服务门户
2022年全国职业院校技能大赛“网络安全”竞赛试题官方答案
V4l2 driver layer analysis
socke.io长连接实现推送、版本控制、实时活跃用户量统计
[CAD drawing Video] AutoCAD 2014 master's way
YYGH-7-用户管理
若依实现下拉框
Jenkins持续集成1
YYGH-BUG-02
[untitled]
UICollectionViewDiffableDataSource及NSDiffableDataSourceSnapshot使用介绍
Typescript base type
Filecoin hacker song developer competition
密码学笔记
How to add live chat in your Shopify store?
Bidirectional level conversion circuit