diff --git a/docs/documentation/cn/sql-reference/sql-functions/date-time-functions/dayofweek.md b/docs/documentation/cn/sql-reference/sql-functions/date-time-functions/dayofweek.md new file mode 100644 index 0000000000..43e6511600 --- /dev/null +++ b/docs/documentation/cn/sql-reference/sql-functions/date-time-functions/dayofweek.md @@ -0,0 +1,22 @@ +# dayofweek + +## Syntax + +`INT dayofweek(DATETIME date)` + +## Description + +DAYOFWEEK函数返回日期的工作日索引值,即星期日为1,星期一为2,星期六为7 + +参数为Date或者Datetime类型 + +## Examples + +``` +mysql> select dayofweek('2019-06-25'); ++----------------------------------+ +| dayofweek('2019-06-25 00:00:00') | ++----------------------------------+ +| 3 | ++----------------------------------+ +``` \ No newline at end of file diff --git a/docs/documentation/cn/sql-reference/sql-functions/string-functions/left.md b/docs/documentation/cn/sql-reference/sql-functions/string-functions/left.md new file mode 100644 index 0000000000..b8376bfbca --- /dev/null +++ b/docs/documentation/cn/sql-reference/sql-functions/string-functions/left.md @@ -0,0 +1,20 @@ +# left + +## Syntax + +`VARCHAR left(VARCHAR str)` + +## Description + +它返回具有指定长度的字符串的左边部分 + +## Examples + +``` +mysql> select left("Hello doris",5); ++------------------------+ +| left('Hello doris', 5) | ++------------------------+ +| Hello | ++------------------------+ +``` diff --git a/docs/documentation/cn/sql-reference/sql-functions/string-functions/right.md b/docs/documentation/cn/sql-reference/sql-functions/string-functions/right.md new file mode 100644 index 0000000000..832a124619 --- /dev/null +++ b/docs/documentation/cn/sql-reference/sql-functions/string-functions/right.md @@ -0,0 +1,20 @@ +# right + +## Syntax + +`VARCHAR right(VARCHAR str)` + +## Description + +它返回具有指定长度的字符串的右边部分 + +## Examples + +``` +mysql> select right("Hello doris",5); ++-------------------------+ +| right('Hello doris', 5) | ++-------------------------+ +| doris | ++-------------------------+ +``` diff --git a/docs/documentation/cn/sql-reference/sql-functions/string-functions/strleft.md b/docs/documentation/cn/sql-reference/sql-functions/string-functions/strleft.md new file mode 100644 index 0000000000..2f7f62027e --- /dev/null +++ b/docs/documentation/cn/sql-reference/sql-functions/string-functions/strleft.md @@ -0,0 +1,20 @@ +# strleft + +## Syntax + +`VARCHAR strleft(VARCHAR str)` + +## Description + +它返回具有指定长度的字符串的左边部分 + +## Examples + +``` +mysql> select strleft("Hello doris",5); ++------------------------+ +| strleft('Hello doris', 5) | ++------------------------+ +| Hello | ++------------------------+ +``` diff --git a/docs/documentation/cn/sql-reference/sql-functions/string-functions/strright.md b/docs/documentation/cn/sql-reference/sql-functions/string-functions/strright.md new file mode 100644 index 0000000000..aeea95ee3a --- /dev/null +++ b/docs/documentation/cn/sql-reference/sql-functions/string-functions/strright.md @@ -0,0 +1,20 @@ +# strright + +## Syntax + +`VARCHAR strright(VARCHAR str)` + +## Description + +它返回具有指定长度的字符串的右边部分 + +## Examples + +``` +mysql> select strright("Hello doris",5); ++-------------------------+ +| strright('Hello doris', 5) | ++-------------------------+ +| doris | ++-------------------------+ +```