Skip to content

Commit

Permalink
Reorder functions in docs aplhabetically.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Oct 4, 2022
1 parent 40eac90 commit 3e45ebb
Show file tree
Hide file tree
Showing 2 changed files with 332 additions and 342 deletions.
333 changes: 161 additions & 172 deletions docs/user/dql/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,103 @@ CURDATE
Description
>>>>>>>>>>>

Specifications:
Returns the current time as a value in 'YYYY-MM-DD'.
CURDATE() returns the time at which it executes as `SYSDATE() <#sysdate>`_ does.

Return type: DATE

Specification: CURDATE() -> DATE

Example::

> SELECT CURDATE();
fetched rows / total rows = 1/1
+-------------+
| CURDATE() |
|-------------|
| 2022-08-02 |
+-------------+


CURRENT_DATE
------------

Description
>>>>>>>>>>>

`CURRENT_DATE` and `CURRENT_DATE()` are synonyms for `CURDATE() <#curdate>`_.

Example::

> SELECT CURRENT_DATE(), CURRENT_DATE;
fetched rows / total rows = 1/1
+------------------+----------------+
| CURRENT_DATE() | CURRENT_DATE |
|------------------+----------------|
| 2022-08-02 | 2022-08-02 |
+------------------+----------------+


CURRENT_TIME
------------

Description
>>>>>>>>>>>

`CURRENT_TIME` and `CURRENT_TIME()` are synonyms for `CURTIME() <#curtime>`_.

Example::

> SELECT CURRENT_TIME(), CURRENT_TIME;
fetched rows / total rows = 1/1
+-----------------+----------------+
| CURRENT_TIME() | CURRENT_TIME |
|-----------------+----------------|
| 15:39:05 | 15:39:05 |
+-----------------+----------------+


CURRENT_TIMESTAMP
-----------------

Description
>>>>>>>>>>>

`CURRENT_TIMESTAMP` and `CURRENT_TIMESTAMP()` are synonyms for `NOW() <#now>`_.

Example::

> SELECT CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP;
fetched rows / total rows = 1/1
+-----------------------+---------------------+
| CURRENT_TIMESTAMP() | CURRENT_TIMESTAMP |
|-----------------------+---------------------|
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
+-----------------------+---------------------+


CURTIME
-------

Description
>>>>>>>>>>>

Returns the current time as a value in 'hh:mm:ss'.
CURTIME() returns the time at which the statement began to execute as `NOW() <#now>`_ does.

Return type: TIME

1. CURDATE() -> DATE
Specification: CURTIME() -> TIME

Example::

> SELECT CURTIME() as value_1, CURTIME() as value_2;
fetched rows / total rows = 1/1
+-----------+-----------+
| value_1 | value_2 |
|-----------+-----------|
| 15:39:05 | 15:39:05 |
+-----------+-----------+


DATE
Expand Down Expand Up @@ -1448,6 +1542,44 @@ Example::
+---------------------------+


LOCALTIMESTAMP
--------------

Description
>>>>>>>>>>>

`LOCALTIMESTAMP` and `LOCALTIMESTAMP()` are synonyms for `NOW() <#now>`_.

Example::

> SELECT LOCALTIMESTAMP(), LOCALTIMESTAMP;
fetched rows / total rows = 1/1
+---------------------+---------------------+
| LOCALTIMESTAMP() | LOCALTIMESTAMP |
|---------------------+---------------------|
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
+---------------------+---------------------+


LOCALTIME
---------

Description
>>>>>>>>>>>

`LOCALTIME` and `LOCALTIME()` are synonyms for `NOW() <#now>`_.

Example::

> SELECT LOCALTIME(), LOCALTIME;
fetched rows / total rows = 1/1
+---------------------+---------------------+
| LOCALTIME() | LOCALTIME |
|---------------------+---------------------|
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
+---------------------+---------------------+


MAKEDATE
--------

Expand Down Expand Up @@ -1630,176 +1762,6 @@ Example::
+---------------------+---------------------+


CURRENT_TIMESTAMP
-----------------

Description
>>>>>>>>>>>

`CURRENT_TIMESTAMP` and `CURRENT_TIMESTAMP()` are synonyms for `NOW() <#now>`_.

Example::

> SELECT CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP;
fetched rows / total rows = 1/1
+-----------------------+---------------------+
| CURRENT_TIMESTAMP() | CURRENT_TIMESTAMP |
|-----------------------+---------------------|
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
+-----------------------+---------------------+


LOCALTIMESTAMP
--------------

Description
>>>>>>>>>>>

`LOCALTIMESTAMP` and `LOCALTIMESTAMP()` are synonyms for `NOW() <#now>`_.

Example::

> SELECT LOCALTIMESTAMP(), LOCALTIMESTAMP;
fetched rows / total rows = 1/1
+---------------------+---------------------+
| LOCALTIMESTAMP() | LOCALTIMESTAMP |
|---------------------+---------------------|
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
+---------------------+---------------------+


LOCALTIME
---------

Description
>>>>>>>>>>>

`LOCALTIME` and `LOCALTIME()` are synonyms for `NOW() <#now>`_.

Example::

> SELECT LOCALTIME(), LOCALTIME;
fetched rows / total rows = 1/1
+---------------------+---------------------+
| LOCALTIME() | LOCALTIME |
|---------------------+---------------------|
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
+---------------------+---------------------+


SYSDATE
-------

Description
>>>>>>>>>>>

Returns the current date and time as a value in 'YYYY-MM-DD hh:mm:ss[.nnnnnn]'.
SYSDATE() returns the time at which it executes. This differs from the behavior for `NOW() <#now>`_, which returns a constant time that indicates the time at which the statement began to execute.
If the argument is given, it specifies a fractional seconds precision from 0 to 6, the return value includes a fractional seconds part of that many digits.

Optional argument type: INTEGER

Return type: DATETIME

Specification: SYSDATE([INTEGER]) -> DATETIME

Example::

> SELECT SYSDATE() as value_1, SYSDATE(6) as value_2;
fetched rows / total rows = 1/1
+---------------------+----------------------------+
| value_1 | value_2 |
|---------------------+----------------------------|
| 2022-08-02 15:39:05 | 2022-08-02 15:39:05.123456 |
+---------------------+----------------------------+


CURTIME
-------

Description
>>>>>>>>>>>

Returns the current time as a value in 'hh:mm:ss'.
CURTIME() returns the time at which the statement began to execute as `NOW() <#now>`_ does.

Return type: TIME

Specification: CURTIME() -> TIME

Example::

> SELECT CURTIME() as value_1, CURTIME() as value_2;
fetched rows / total rows = 1/1
+-----------+-----------+
| value_1 | value_2 |
|-----------+-----------|
| 15:39:05 | 15:39:05 |
+-----------+-----------+


CURRENT_TIME
------------

Description
>>>>>>>>>>>

`CURRENT_TIME` and `CURRENT_TIME()` are synonyms for `CURTIME() <#curtime>`_.

Example::

> SELECT CURRENT_TIME(), CURRENT_TIME;
fetched rows / total rows = 1/1
+-----------------+----------------+
| CURRENT_TIME() | CURRENT_TIME |
|-----------------+----------------|
| 15:39:05 | 15:39:05 |
+-----------------+----------------+


CURDATE
-------

Description
>>>>>>>>>>>

Returns the current time as a value in 'YYYY-MM-DD'.
CURDATE() returns the time at which it executes as `SYSDATE() <#sysdate>`_ does.

Return type: DATE

Specification: CURDATE() -> DATE

Example::

> SELECT CURDATE();
fetched rows / total rows = 1/1
+-------------+
| CURDATE() |
|-------------|
| 2022-08-02 |
+-------------+


CURRENT_DATE
------------

Description
>>>>>>>>>>>

`CURRENT_DATE` and `CURRENT_DATE()` are synonyms for `CURDATE() <#curdate>`_.

Example::

> SELECT CURRENT_DATE(), CURRENT_DATE;
fetched rows / total rows = 1/1
+------------------+----------------+
| CURRENT_DATE() | CURRENT_DATE |
|------------------+----------------|
| 2022-08-02 | 2022-08-02 |
+------------------+----------------+


QUARTER
-------

Expand Down Expand Up @@ -1877,6 +1839,33 @@ Example::
+------------------------------------------------+----------------------------------+------------------------------------------------+


SYSDATE
-------

Description
>>>>>>>>>>>

Returns the current date and time as a value in 'YYYY-MM-DD hh:mm:ss[.nnnnnn]'.
SYSDATE() returns the time at which it executes. This differs from the behavior for `NOW() <#now>`_, which returns a constant time that indicates the time at which the statement began to execute.
If the argument is given, it specifies a fractional seconds precision from 0 to 6, the return value includes a fractional seconds part of that many digits.

Optional argument type: INTEGER

Return type: DATETIME

Specification: SYSDATE([INTEGER]) -> DATETIME

Example::

> SELECT SYSDATE() as value_1, SYSDATE(6) as value_2;
fetched rows / total rows = 1/1
+---------------------+----------------------------+
| value_1 | value_2 |
|---------------------+----------------------------|
| 2022-08-02 15:39:05 | 2022-08-02 15:39:05.123456 |
+---------------------+----------------------------+


TIME
----

Expand Down
Loading

0 comments on commit 3e45ebb

Please sign in to comment.