informix
Informix Guide to SQL: Syntax
Segments

Literal INTERVAL

The Literal INTERVAL segment specifies a literal INTERVAL value. Use the Literal INTERVAL segment whenever you see a reference to a literal INTERVAL in a syntax diagram.

Syntax

Element Purpose Restrictions Syntax
dd Number of days The maximum number of digits allowed is 2, unless this is the first field and the precision is specified differently by the INTERVAL field qualifier. Literal Number, p. 4-237
f Decimal fraction of a second You can specify up to 5 digits, depending on the precision given to the fractional portion in the INTERVAL field qualifier. Literal Number, p. 4-237
hh Number of hours The maximum number of digits allowed is 2, unless this is the first field and the precision is specified differently by the INTERVAL field qualifier. Literal Number, p. 4-237
mi Number of minutes The maximum number of digits allowed is 2, unless this is the first field and the precision is specified differently by the INTERVAL field qualifier. Literal Number, p. 4-237
mo Number of months The maximum number of digits allowed is 2, unless this is the first field and the precision is specified differently by the INTERVAL field qualifier. Literal Number, p. 4-237
space Space character You cannot use any other character in place of the space character. The space character is a literal value that you enter by pressing the space bar on the keyboard.
ss Number of seconds The maximum number of digits allowed is 2, unless this is the first field and the precision is specified differently by the INTERVAL field qualifier. Literal Number, p. 4-237
yyyy Number of years The maximum number of digits allowed is 4, unless this is the first field and the precision is specified differently by the INTERVAL field qualifier. Literal Number, p. 4-237

Usage

The following examples show literal INTERVAL values:

Related Information

For information on how to use INTERVAL data in arithmetic and relational operations, see the discussion of the INTERVAL data type in the Informix Guide to SQL: Reference.


Informix Guide to SQL: Syntax, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved