diff --git a/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/ceil.md b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/ceil.md index d9e6fd1d8..07826bd34 100644 --- a/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/ceil.md +++ b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/ceil.md @@ -2,7 +2,7 @@ ## **Description** -The CEIL(X) function returns the smallest integer value not less than X. +The CEIL(X) function returns the smallest integer value not less than X.Synonymous with [`CEILING()`](ceiling.md). ## **Syntax** diff --git a/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/ceiling.md b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/ceiling.md new file mode 100644 index 000000000..ca01a3e29 --- /dev/null +++ b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/ceiling.md @@ -0,0 +1,65 @@ +# **CEILING()** + +## **Description** + +The CEILING(X) function returns the smallest integer value not less than X.Synonymous with [`CEIL()`](ceil.md). + +## **Syntax** + +``` +> CEILING(X) +``` + +## **Arguments** + +| Arguments | Description | +| ---- | ---- | +| X | Required. Any numeric data type supported now. | + +For exact-value numeric arguments, the return value has an exact-value numeric type. For floating-point arguments, the return value has a floating-point type. + +## **Examples** + +```sql +drop table if exists t1; +create table t1(a int ,b float); +insert into t1 values(1,0.5); +insert into t1 values(2,0.499); +insert into t1 values(3,0.501); +insert into t1 values(4,20.5); +insert into t1 values(5,20.499); +insert into t1 values(6,13.500); +insert into t1 values(7,-0.500); +insert into t1 values(8,-0.499); +insert into t1 values(9,-0.501); +insert into t1 values(10,-20.499); +insert into t1 values(11,-20.500); +insert into t1 values(12,-13.500); + +mysql> select a,ceiling(b) from t1; ++------+------------+ +| a | ceiling(b) | ++------+------------+ +| 1 | 1 | +| 2 | 1 | +| 3 | 1 | +| 4 | 21 | +| 5 | 21 | +| 6 | 14 | +| 7 | -0 | +| 8 | -0 | +| 9 | -0 | +| 10 | -20 | +| 11 | -20 | +| 12 | -13 | ++------+------------+ +12 rows in set (0.00 sec) + +mysql> select sum(ceiling(b)) from t1; ++-----------------+ +| sum(ceiling(b)) | ++-----------------+ +| 6 | ++-----------------+ +1 row in set (0.01 sec) +``` \ No newline at end of file diff --git a/docs/MatrixOne/Reference/Functions-and-Operators/matrixone-function-list.md b/docs/MatrixOne/Reference/Functions-and-Operators/matrixone-function-list.md index 2f20bfa7f..a51b3e222 100644 --- a/docs/MatrixOne/Reference/Functions-and-Operators/matrixone-function-list.md +++ b/docs/MatrixOne/Reference/Functions-and-Operators/matrixone-function-list.md @@ -66,6 +66,7 @@ This document lists the functions supported in the latest version of MatrixOne. | [ACOS()](./Mathematical/acos.md) | Used to find the cosine of a given value (expressed in radians) | | [ATAN()](./Mathematical/atan.md) | Used to find the arctangent of a given value (expressed in radians)| | [CEIL()](./Mathematical/ceil.md) | Used to find the smallest integer that is not less than the argument.| +| [CEILING()](./Mathematical/ceiling.md) | Used to find the smallest integer that is not less than the argument.| | [COS()](./Mathematical/cos.md) | Used to find the cosine of an input parameter (expressed in radians).| | [COT()](./Mathematical/cot.md) | Used to find the cotangent value of the input parameter (expressed in radians). | | [EXP()](./Mathematical/exp.md) | Used to find the exponent of number with the natural constant e as the base.| diff --git a/mkdocs.yml b/mkdocs.yml index 4e3e84606..55fbdeab9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -552,6 +552,7 @@ nav: - ACOS(): MatrixOne/Reference/Functions-and-Operators/Mathematical/acos.md - ATAN(): MatrixOne/Reference/Functions-and-Operators/Mathematical/atan.md - CEIL(): MatrixOne/Reference/Functions-and-Operators/Mathematical/ceil.md + - CEILING(): MatrixOne/Reference/Functions-and-Operators/Mathematical/ceiling.md - COS(): MatrixOne/Reference/Functions-and-Operators/Mathematical/cos.md - COT(): MatrixOne/Reference/Functions-and-Operators/Mathematical/cot.md - EXP(): MatrixOne/Reference/Functions-and-Operators/Mathematical/exp.md