|
|
The EXTRACT Function
Syntax for the EXTRACT function:
Rules:
- field-name is one of: YEAR, MONTH, DAY, HOUR, MINUTE or SECOND.
- value must be of type DATETIME or INTERVAL and it must contain the field specified by field-name, otherwise an error is raised.
- The data type of the result is exact numeric with a precision equal to the leading precision of value and a scale of 0.
The exception is when field-name is SECOND, in which case the precision is equal to the sum of the leading precision and the seconds precision of value, with a scale equal to the seconds precision.
- When value is a negative INTERVAL, the result is a negative value. In all other cases the result is a positive value.
- If the value of value is NULL, then the result of the function is NULL.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|