DECLARE
v_great_result NUMBER;
v_least_result NUMBER;
BEGIN
SELECT GREATEST(100,200,300) INTO
v_great_result FROM DUAL;
SELECT LEAST(100,200,300) INTO
v_least_result FROM DUAL;
DBMS_OUTPUT.PUT_LINE('Value returned by the GREATEST Function : '||v_great_result);
DBMS_OUTPUT.PUT_LINE('Value returned by the LEAST Function : '||v_least_result);
END;
Value returned by the GREATEST Function : 300
Value returned by the LEAST Function : 100