Interval Data types:
Interval
data types could be broadly classified in 2 categories:
- Year-Month
YEAR
YEAR TO MONTH
MONTH
- Day-Time
DAY
DAY TO HOUR
DAY TO MINUTE
DAY TO SECOND
HOUR
HOUR TO MINUTE
HOUR TO SECOND
MINUTE
MINUTE TO SECOND
SECOND
- All YEAR-MONTH interval types can be combined with a date to produce a new date.
Only one DAY-TIME
interval that can be combined with Date is DAY.
- Intervals can be converted from one type to another using CAST. However conversions are possible within a category. That means we cannot convert YEAR to MINUTE interval. Similarly DAY cannot be converted to YEAR or YEAR to MONTH.
- Interval data types represent displacement in time.
- Internally interval data types are stored as numeric fields
No comments:
Post a Comment