You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
967
1051
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
+
+-----------+-----------+
969
1063
970
1064
971
1065
DATE
@@ -1448,6 +1542,44 @@ Example::
1448
1542
+---------------------------+
1449
1543
1450
1544
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
+
1451
1583
MAKEDATE
1452
1584
--------
1453
1585
@@ -1630,176 +1762,6 @@ Example::
1630
1762
+---------------------+---------------------+
1631
1763
1632
1764
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;
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;
0 commit comments