You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/07/11 03:50:19 UTC

[doris] branch master updated: [docs]fix typo in substring docs (#10747)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 4cd4f94717 [docs]fix typo in substring docs (#10747)
4cd4f94717 is described below

commit 4cd4f94717e577dc2b06b7b90faac78475f3ae4b
Author: camby <10...@qq.com>
AuthorDate: Mon Jul 11 11:50:13 2022 +0800

    [docs]fix typo in substring docs (#10747)
---
 .../sql-manual/sql-functions/string-functions/substring.md   | 12 ++++++++++--
 .../sql-manual/sql-functions/string-functions/substring.md   |  9 ++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/docs/en/docs/sql-manual/sql-functions/string-functions/substring.md b/docs/en/docs/sql-manual/sql-functions/string-functions/substring.md
index 49cf21f081..78064b8aa2 100644
--- a/docs/en/docs/sql-manual/sql-functions/string-functions/substring.md
+++ b/docs/en/docs/sql-manual/sql-functions/string-functions/substring.md
@@ -41,10 +41,11 @@ For all forms of SUBSTRING(),
 the position of the first character in the string from which the substring is to be extracted is reckoned as 1.
 
 If len is less than 1, the result is the empty string.
+
 ### example
 
 ```
-mysql> select substring('abc1', -2);
+mysql> select substring('abc1', 2);
 +-----------------------------+
 | substring('abc1', 2)        |
 +-----------------------------+
@@ -58,6 +59,13 @@ mysql> select substring('abc1', -2);
 | c1                          |
 +-----------------------------+
 
+mysql> select substring('abc1', 0);
++----------------------+
+| substring('abc1', 0) |
++----------------------+
+|                      |
++----------------------+
+
 mysql> select substring('abc1', 5);
 +-----------------------------+
 | substring('abc1', 5)        |
@@ -74,4 +82,4 @@ mysql> select substring('abc1def', 2, 2);
 ```
 
 ### keywords
-SUBSTRING
+SUBSTRING, STRING
diff --git a/docs/zh-CN/docs/sql-manual/sql-functions/string-functions/substring.md b/docs/zh-CN/docs/sql-manual/sql-functions/string-functions/substring.md
index 736551de55..21abea7a50 100644
--- a/docs/zh-CN/docs/sql-manual/sql-functions/string-functions/substring.md
+++ b/docs/zh-CN/docs/sql-manual/sql-functions/string-functions/substring.md
@@ -54,6 +54,13 @@ mysql> select substring('abc1', -2);
 | c1                          |
 +-----------------------------+
 
+mysql> select substring('abc1', 0);
++----------------------+
+| substring('abc1', 0) |
++----------------------+
+|                      |
++----------------------+
+
 mysql> select substring('abc1', 5);
 +-----------------------------+
 | substring('abc1', 5)        |
@@ -69,4 +76,4 @@ mysql> select substring('abc1def', 2, 2);
 +-----------------------------+
 ```
 ### keywords
-SUBSTRING
+SUBSTRING, STRING


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org