Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Let's implement Oracle compatible datetime additive expressions for sql_mode=ORACLE, as follows:
Operation | Result | Description |
---|---|---|
Datetime + number | Datetime | Adds a number of days to a datetime |
Datetime - number | Datetime | Subtracts a number of days from a datetime |
Datetime – datetime | Number of days | Subracts one datetime from another |
Datetime + number/24 | Datetime | Adds a number of hours to a date |
Example:
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS'; |
SELECT SYSDATE, SYSDATE-1, SYSDATE+1 FROM DUAL; |
SYSDATE | SYSDATE-1 | SYSDATE+1 |
---|---|---|
2024-07-10 07:54:28 | 2024-07-09 07:54:28 | 2024-07-11 07:54:28 |
Attachments
Issue Links
- blocks
-
MDEV-34569 Oracle compatibility project 4
- Open