Skip to content

Commit 3e45ebb

Browse files
Reorder functions in docs aplhabetically.
Signed-off-by: Yury-Fridlyand <[email protected]>
1 parent 40eac90 commit 3e45ebb

File tree

2 files changed

+332
-342
lines changed

2 files changed

+332
-342
lines changed

docs/user/dql/functions.rst

Lines changed: 161 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -963,9 +963,103 @@ CURDATE
963963
Description
964964
>>>>>>>>>>>
965965

966-
Specifications:
966+
Returns the current time as a value in 'YYYY-MM-DD'.
967+
CURDATE() returns the time at which it executes as `SYSDATE() <#sysdate>`_ does.
968+
969+
Return type: DATE
970+
971+
Specification: CURDATE() -> DATE
972+
973+
Example::
974+
975+
> SELECT CURDATE();
976+
fetched rows / total rows = 1/1
977+
+-------------+
978+
| CURDATE() |
979+
|-------------|
980+
| 2022-08-02 |
981+
+-------------+
982+
983+
984+
CURRENT_DATE
985+
------------
986+
987+
Description
988+
>>>>>>>>>>>
989+
990+
`CURRENT_DATE` and `CURRENT_DATE()` are synonyms for `CURDATE() <#curdate>`_.
991+
992+
Example::
993+
994+
> SELECT CURRENT_DATE(), CURRENT_DATE;
995+
fetched rows / total rows = 1/1
996+
+------------------+----------------+
997+
| CURRENT_DATE() | CURRENT_DATE |
998+
|------------------+----------------|
999+
| 2022-08-02 | 2022-08-02 |
1000+
+------------------+----------------+
1001+
1002+
1003+
CURRENT_TIME
1004+
------------
1005+
1006+
Description
1007+
>>>>>>>>>>>
1008+
1009+
`CURRENT_TIME` and `CURRENT_TIME()` are synonyms for `CURTIME() <#curtime>`_.
1010+
1011+
Example::
1012+
1013+
> SELECT CURRENT_TIME(), CURRENT_TIME;
1014+
fetched rows / total rows = 1/1
1015+
+-----------------+----------------+
1016+
| CURRENT_TIME() | CURRENT_TIME |
1017+
|-----------------+----------------|
1018+
| 15:39:05 | 15:39:05 |
1019+
+-----------------+----------------+
1020+
1021+
1022+
CURRENT_TIMESTAMP
1023+
-----------------
1024+
1025+
Description
1026+
>>>>>>>>>>>
1027+
1028+
`CURRENT_TIMESTAMP` and `CURRENT_TIMESTAMP()` are synonyms for `NOW() <#now>`_.
1029+
1030+
Example::
1031+
1032+
> SELECT CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP;
1033+
fetched rows / total rows = 1/1
1034+
+-----------------------+---------------------+
1035+
| CURRENT_TIMESTAMP() | CURRENT_TIMESTAMP |
1036+
|-----------------------+---------------------|
1037+
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
1038+
+-----------------------+---------------------+
1039+
1040+
1041+
CURTIME
1042+
-------
1043+
1044+
Description
1045+
>>>>>>>>>>>
1046+
1047+
Returns the current time as a value in 'hh:mm:ss'.
1048+
CURTIME() returns the time at which the statement began to execute as `NOW() <#now>`_ does.
1049+
1050+
Return type: TIME
9671051

968-
1. CURDATE() -> DATE
1052+
Specification: CURTIME() -> TIME
1053+
1054+
Example::
1055+
1056+
> SELECT CURTIME() as value_1, CURTIME() as value_2;
1057+
fetched rows / total rows = 1/1
1058+
+-----------+-----------+
1059+
| value_1 | value_2 |
1060+
|-----------+-----------|
1061+
| 15:39:05 | 15:39:05 |
1062+
+-----------+-----------+
9691063

9701064

9711065
DATE
@@ -1448,6 +1542,44 @@ Example::
14481542
+---------------------------+
14491543

14501544

1545+
LOCALTIMESTAMP
1546+
--------------
1547+
1548+
Description
1549+
>>>>>>>>>>>
1550+
1551+
`LOCALTIMESTAMP` and `LOCALTIMESTAMP()` are synonyms for `NOW() <#now>`_.
1552+
1553+
Example::
1554+
1555+
> SELECT LOCALTIMESTAMP(), LOCALTIMESTAMP;
1556+
fetched rows / total rows = 1/1
1557+
+---------------------+---------------------+
1558+
| LOCALTIMESTAMP() | LOCALTIMESTAMP |
1559+
|---------------------+---------------------|
1560+
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
1561+
+---------------------+---------------------+
1562+
1563+
1564+
LOCALTIME
1565+
---------
1566+
1567+
Description
1568+
>>>>>>>>>>>
1569+
1570+
`LOCALTIME` and `LOCALTIME()` are synonyms for `NOW() <#now>`_.
1571+
1572+
Example::
1573+
1574+
> SELECT LOCALTIME(), LOCALTIME;
1575+
fetched rows / total rows = 1/1
1576+
+---------------------+---------------------+
1577+
| LOCALTIME() | LOCALTIME |
1578+
|---------------------+---------------------|
1579+
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
1580+
+---------------------+---------------------+
1581+
1582+
14511583
MAKEDATE
14521584
--------
14531585

@@ -1630,176 +1762,6 @@ Example::
16301762
+---------------------+---------------------+
16311763

16321764

1633-
CURRENT_TIMESTAMP
1634-
-----------------
1635-
1636-
Description
1637-
>>>>>>>>>>>
1638-
1639-
`CURRENT_TIMESTAMP` and `CURRENT_TIMESTAMP()` are synonyms for `NOW() <#now>`_.
1640-
1641-
Example::
1642-
1643-
> SELECT CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP;
1644-
fetched rows / total rows = 1/1
1645-
+-----------------------+---------------------+
1646-
| CURRENT_TIMESTAMP() | CURRENT_TIMESTAMP |
1647-
|-----------------------+---------------------|
1648-
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
1649-
+-----------------------+---------------------+
1650-
1651-
1652-
LOCALTIMESTAMP
1653-
--------------
1654-
1655-
Description
1656-
>>>>>>>>>>>
1657-
1658-
`LOCALTIMESTAMP` and `LOCALTIMESTAMP()` are synonyms for `NOW() <#now>`_.
1659-
1660-
Example::
1661-
1662-
> SELECT LOCALTIMESTAMP(), LOCALTIMESTAMP;
1663-
fetched rows / total rows = 1/1
1664-
+---------------------+---------------------+
1665-
| LOCALTIMESTAMP() | LOCALTIMESTAMP |
1666-
|---------------------+---------------------|
1667-
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
1668-
+---------------------+---------------------+
1669-
1670-
1671-
LOCALTIME
1672-
---------
1673-
1674-
Description
1675-
>>>>>>>>>>>
1676-
1677-
`LOCALTIME` and `LOCALTIME()` are synonyms for `NOW() <#now>`_.
1678-
1679-
Example::
1680-
1681-
> SELECT LOCALTIME(), LOCALTIME;
1682-
fetched rows / total rows = 1/1
1683-
+---------------------+---------------------+
1684-
| LOCALTIME() | LOCALTIME |
1685-
|---------------------+---------------------|
1686-
| 2022-08-02 15:54:19 | 2022-08-02 15:54:19 |
1687-
+---------------------+---------------------+
1688-
1689-
1690-
SYSDATE
1691-
-------
1692-
1693-
Description
1694-
>>>>>>>>>>>
1695-
1696-
Returns the current date and time as a value in 'YYYY-MM-DD hh:mm:ss[.nnnnnn]'.
1697-
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.
1698-
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.
1699-
1700-
Optional argument type: INTEGER
1701-
1702-
Return type: DATETIME
1703-
1704-
Specification: SYSDATE([INTEGER]) -> DATETIME
1705-
1706-
Example::
1707-
1708-
> SELECT SYSDATE() as value_1, SYSDATE(6) as value_2;
1709-
fetched rows / total rows = 1/1
1710-
+---------------------+----------------------------+
1711-
| value_1 | value_2 |
1712-
|---------------------+----------------------------|
1713-
| 2022-08-02 15:39:05 | 2022-08-02 15:39:05.123456 |
1714-
+---------------------+----------------------------+
1715-
1716-
1717-
CURTIME
1718-
-------
1719-
1720-
Description
1721-
>>>>>>>>>>>
1722-
1723-
Returns the current time as a value in 'hh:mm:ss'.
1724-
CURTIME() returns the time at which the statement began to execute as `NOW() <#now>`_ does.
1725-
1726-
Return type: TIME
1727-
1728-
Specification: CURTIME() -> TIME
1729-
1730-
Example::
1731-
1732-
> SELECT CURTIME() as value_1, CURTIME() as value_2;
1733-
fetched rows / total rows = 1/1
1734-
+-----------+-----------+
1735-
| value_1 | value_2 |
1736-
|-----------+-----------|
1737-
| 15:39:05 | 15:39:05 |
1738-
+-----------+-----------+
1739-
1740-
1741-
CURRENT_TIME
1742-
------------
1743-
1744-
Description
1745-
>>>>>>>>>>>
1746-
1747-
`CURRENT_TIME` and `CURRENT_TIME()` are synonyms for `CURTIME() <#curtime>`_.
1748-
1749-
Example::
1750-
1751-
> SELECT CURRENT_TIME(), CURRENT_TIME;
1752-
fetched rows / total rows = 1/1
1753-
+-----------------+----------------+
1754-
| CURRENT_TIME() | CURRENT_TIME |
1755-
|-----------------+----------------|
1756-
| 15:39:05 | 15:39:05 |
1757-
+-----------------+----------------+
1758-
1759-
1760-
CURDATE
1761-
-------
1762-
1763-
Description
1764-
>>>>>>>>>>>
1765-
1766-
Returns the current time as a value in 'YYYY-MM-DD'.
1767-
CURDATE() returns the time at which it executes as `SYSDATE() <#sysdate>`_ does.
1768-
1769-
Return type: DATE
1770-
1771-
Specification: CURDATE() -> DATE
1772-
1773-
Example::
1774-
1775-
> SELECT CURDATE();
1776-
fetched rows / total rows = 1/1
1777-
+-------------+
1778-
| CURDATE() |
1779-
|-------------|
1780-
| 2022-08-02 |
1781-
+-------------+
1782-
1783-
1784-
CURRENT_DATE
1785-
------------
1786-
1787-
Description
1788-
>>>>>>>>>>>
1789-
1790-
`CURRENT_DATE` and `CURRENT_DATE()` are synonyms for `CURDATE() <#curdate>`_.
1791-
1792-
Example::
1793-
1794-
> SELECT CURRENT_DATE(), CURRENT_DATE;
1795-
fetched rows / total rows = 1/1
1796-
+------------------+----------------+
1797-
| CURRENT_DATE() | CURRENT_DATE |
1798-
|------------------+----------------|
1799-
| 2022-08-02 | 2022-08-02 |
1800-
+------------------+----------------+
1801-
1802-
18031765
QUARTER
18041766
-------
18051767

@@ -1877,6 +1839,33 @@ Example::
18771839
+------------------------------------------------+----------------------------------+------------------------------------------------+
18781840

18791841

1842+
SYSDATE
1843+
-------
1844+
1845+
Description
1846+
>>>>>>>>>>>
1847+
1848+
Returns the current date and time as a value in 'YYYY-MM-DD hh:mm:ss[.nnnnnn]'.
1849+
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.
1850+
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.
1851+
1852+
Optional argument type: INTEGER
1853+
1854+
Return type: DATETIME
1855+
1856+
Specification: SYSDATE([INTEGER]) -> DATETIME
1857+
1858+
Example::
1859+
1860+
> SELECT SYSDATE() as value_1, SYSDATE(6) as value_2;
1861+
fetched rows / total rows = 1/1
1862+
+---------------------+----------------------------+
1863+
| value_1 | value_2 |
1864+
|---------------------+----------------------------|
1865+
| 2022-08-02 15:39:05 | 2022-08-02 15:39:05.123456 |
1866+
+---------------------+----------------------------+
1867+
1868+
18801869
TIME
18811870
----
18821871

0 commit comments

Comments
 (0)