Skip to content

MySQL allows integer interval values #298

Open
@duvall-eb

Description

@duvall-eb

The usual format for an interval is INTERVAL 'value' unit, but MySQL allows 'value' to be an expression that is either a string or a number. For example:

SELECT DATE_SUB('2018-05-01',INTERVAL '1' YEAR);
SELECT DATE_SUB('2018-05-01',INTERVAL 1 YEAR);

both return 2017-05-01. Currently, the latter syntax is not supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions