| Standard SQL | Netezza SQL |
|---|---|
| Declares intervals as having particular units; for example, colA interval year to month, or colB interval hour. | Accepts this syntax, but ignores the unit specification. All intervals are the same, and can contain values of any combination of units. The hours field of the interval is stored as an integer and thus has a maximum value of 2147483647. |
| Does not include units in interval literals. For example, an interval year to month column values might be “13-4,” meaning 13 years and 4 months. | Requires that all literal values include the units, as in “13 years 4 months,” because interval units pertain to a particular value rather than to a particular column declaration. |
| Disallows declaring intervals as having both units smaller than a month and units greater than a day; for example, interval month to day, because this is ambiguous. | Internally normalizes all intervals to units of seconds. Considers
a month to be 30 days for the purposes of interval comparisons. To avoid inaccuracies that are introduced by this approximation, use only intervals in units smaller than months. |