| Modifier and Type | Interface and Description |
|---|---|
interface |
ConversionFunction
转换函数: CAST()(类型转换)、CONVERT()(转换数据类型)等。
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
DatetimeFunction
• CURRENT_DATE 或 CURDATE(): 返回当前日期。
• CURRENT_TIME 或 CURTIME(): 返回当前时间。
• DATEADD(date, interval, unit): 向日期加上指定的时间间隔。
• DATEDIFF(date1, date2): 返回两个日期之间的天数。
• YEAR(date): 返回日期的年份。
• MONTH(date): 返回日期的月份。
• DAY(date): 返回日期的天数。
• DATE_FORMAT(date, format): 格式化日期为指定的格式。
|
| Modifier and Type | Class and Description |
|---|---|
class |
DateFormat |
class |
Now |
| Modifier and Type | Class and Description |
|---|---|
class |
AsBinary |
class |
AsText |
class |
Contains |
class |
Distance |
class |
DistanceSphere |
class |
Latitude |
class |
Longitude |
class |
SRID |
| Modifier and Type | Interface and Description |
|---|---|
interface |
NumberFunction
• ABS(x): 返回 x 的绝对值。
• CEIL(x) 或 CEILING(x): 向上取整到最接近的整数。
• FLOOR(x): 向下取整到最接近的整数。
• ROUND(x, d): 将 x 四舍五入到 d 位小数。
• POW(x, y) 或 POWER(x, y): 返回 x 的 y 次幂。
• SQRT(x): 返回 x 的平方根。
• EXP(x): 返回 e 的 x 次幂。
• LOG(x): 返回 x 的自然对数。
• LOG10(x): 返回 x 的以 10 为底的对数。
|
| Modifier and Type | Class and Description |
|---|---|
class |
Abs
绝对值
|
class |
Ceiling
向上取整,返回不小于该列的最小整数。
|
class |
Floor
向下取整,返回不大于该列的最大整数。
|
class |
Mod
取模
|
class |
Round
指定小数位,四舍五入
|
class |
Truncate
截断数字到指定小数位,不进行四舍五入。
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
StringFunction
• CONCAT(str1, str2, ...): 连接两个或多个字符串。
• SUBSTRING(str, start, length): 从字符串 str 中提取子串。
• LENGTH(str) 或 LEN(str): 返回字符串的长度。
• TRIM(str): 删除字符串前后的空格。
• REPLACE(str, search, replace): 替换字符串中的子串。
|
Copyright © 2024–2025 Dynamic-SQL. All rights reserved.