Incorporate Comments 1
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/a2f740b9 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/a2f740b9 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/a2f740b9 Branch: refs/heads/master Commit: a2f740b996828b12972741b19b2292cf9a476883 Parents: 609cd5f Author: liu.yu <qwerty...@hotmail.com> Authored: Fri Apr 20 14:08:04 2018 +0800 Committer: liu.yu <qwerty...@hotmail.com> Committed: Fri Apr 20 14:08:04 2018 +0800 ---------------------------------------------------------------------- .../_chapters/sql_functions_and_expressions.adoc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/a2f740b9/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc ---------------------------------------------------------------------- diff --git a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc index 83afe9d..a12b983 100644 --- a/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc +++ b/docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc @@ -9035,10 +9035,12 @@ WHERE UPSHIFT(D1.deptname) = UPSHIFT(D2.deptname); [[rand_function]] == RAND Function -The RAND Function generates pseudo-random numbers that are uniformly distributed +The RAND function generates pseudo-random numbers that are uniformly distributed in the range between 0 and 2^32^ (=4294967296), using an integer as an optional seed value. +NOTE: the RAND function does not always behaves in predictive ways. + ``` RAND ([numeric-expression]) ``` @@ -9116,19 +9118,6 @@ SQL>SELECT POWER(RAND(1)*10,3) FROM DUAL; [[rand_function_example]] === Examples of RAND Function -* This example returns random values using 0, 1, 10, 100 and 1000 as seed values. - -+ -``` -SQL>SELECT RAND(0), RAND(1), RAND(10), RAND(100), RAND(1000) FROM DUAL; - -(EXPR) (EXPR) (EXPR) (EXPR) (EXPR) ----------- ---------- ---------- ---------- ---------- -2147483647 16807 168070 1680700 16807000 - ---- 1 row(s) selected. -``` - * This example demostrates how to use the RAND function with built-in function (ABS function). +