当前位置:网站首页>SQL 函数
SQL 函数
2022-06-26 09:32:00 【郭宝】
SQL 函数的定义:
SQL 拥有很多用于计数和计算的内建函数。
SQL 函数的语法:
SELECT function(列名称) FROM 表名称SQL 函数的类型:
在SQL中,基本的函数类型和种类有若干种,函数的基本类型是:
- Aggregate 函数
- Scalar 函数
1、SQL 中的 Aggregate functions (合计函数)和 Scalar 函数
2、SQL 中 AVG 函数(可以返回数值列的平均值)
3、SQL 中的 COUNT()函数 (可以返回匹配指定条件的函数)
4、SQL 中的 FIRST() 函数 (可以返回指定字段中的第一个记录的值)
5、SQL 中的LAST() 函数 (可以返回指定字段中最后一个记录的值)
6、SQL 中的MAX() 函数 (可以返回一列中最大的值,NULL值不包括在计算中)
7、SQL 中的 MIN() 函数 (可以返回一列中最小的值,NULL值不包括在计算中)
8、SQL 中的SUM()函数 (可以返回数值列的总数)
9、SQL 中的 GROUP BY 语句 (用于结合合计函数(例如:SUM()函数),根据一个或多个列对结果集进行分组
10、SQL中的 HAVING 语句 (在SQL中增加HAVING子句的原因是 WHERE 关键字无法与合计函数一起使用)
11、SQL 中的 UCASE() 函数 (该函数可以将字段的值转换为大写)
12、SQL 中的 LCASE() 函数 (该函数可以将字段的值转换为小写)
13、SQL 中的 MID() 函数 (该函数可以从文本字段中提取字符)
14、SQL 中的 LEN() 函数 (该函数可以返回文本字段中值的长度)
15、SQL 中的 ROUND() 函数 (该函数可以将数值字段舍入为指定的小数位数)
16、SQL 中的额 NOW() 函数 (该函数可以返回当前的日期和时间)
17、SQL 中的 FORMAT() 函数 (该函数可以对字段的显示进行格式化)
边栏推荐
- 《一周搞定模电》-光耦等元器件
- Detectron2 save (according to maxap50) model during training_ best. PTH weight
- Wechat official account reported error 10003
- How to view the data mini map quickly and conveniently after importing data in origin
- QPM performance monitoring components - General
- Statistics of various target quantities of annotations (XML annotation format)
- 【CVPR 2021】Unsupervised Multi-Source Domain Adaptation for Person Re-Identification (UMSDA)
- "One week's work on Analog Electronics" - diodes
- [Journal of Computer Aided Design & computer graphics] overview of research on pedestrian re recognition methods based on generated countermeasure network
- Differences between VI and vim and common commands
猜你喜欢

How to view the data mini map quickly and conveniently after importing data in origin

Edge computing is the sinking and extension of cloud computing capabilities to the edge and user sides

Behavior tree file description

Badge series 7: use of codacy
How to correctly open the USB debugging and complete log functions of Huawei mobile phones?

Classified catalogue of high quality sci-tech periodicals in the field of computing

Yolov5 results Txt visualization

The shutter tabbar listener is called twice

Regular expression learning

"One week's work on Analog Electronics" - optocoupler and other components
随机推荐
【CVPR 2021】Joint Generative and Contrastive Learning for Unsupervised Person Re-identification
"One week to solve the model electricity" - negative feedback
Industrial and enterprise patent matching data (hundreds of thousands of data) 1998-2014
异常记录-23
《一周搞定模电》—负反馈
Several connection query methods of SQL (internal connection, external connection, full connection and joint query)
《一周学习模电》-电容、三极管、场效应管
js---获取对象数组中key值相同的数据,得到一个新的数组
Single sign on logic
Shared by Merrill Lynch data technology expert team, smoking detection related practice based on Jetson nano
Merrill Lynch data technology expert team | building a cloud native product system based on containers
Statistics of various target quantities of annotations (XML annotation format)
How to correctly open the USB debugging and complete log functions of Huawei mobile phones?
"One week's work on Analog Electronics" - integrated operational amplifier
51 single chip microcomputer ROM and ram
PHP does not allow images to be uploaded together with data (no longer uploading images before uploading data)
"One week's work on Analog Electronics" - diodes
【pulsar学习】pulsar架构原理
Wechat official account reported error 10003
The first problem troubleshooting process of re disk