declare
variable1_int INTERVAL YEAR[(precision)] TO MONTH;
begin
NULL;
end;
The INTERVAL YEAR TO MONTH datatype allows you to store and manipulate intervals of years and months.
You can specify the number of digits in years that you want to store (by default 2, available range is 0?).
INTERVAL DAY
declare
variable2_int INTERVAL DAY[(precision)] to SECOND[(precision)];
begin
NULL;
end;
The INTERVAL DAY TO SECOND datatype allows you to store and manipulate intervals of days, hours, minutes, and seconds.
In this case, day precision allows you to set the number of digits you want to store, and second precision identifies the number of digits used to store fractions of seconds.