Assigning Literals to an INTERVAL YEAR TO MONTH Variable
DECLARE
lifetime INTERVAL YEAR(3) TO MONTH;
BEGIN
lifetime := INTERVAL '101-3' YEAR TO MONTH; -- interval literal
lifetime := '101-3'; -- implicit conversion from character type
lifetime := INTERVAL '101' YEAR; -- Can specify just the years
lifetime := INTERVAL '3' MONTH; -- Can specify just the months
END;
/
0 comments:
Post a Comment