Header Ads

Header ADS

Total Salary Without Using Group Function

Total Salary Without Using Group Function

Topic Introduction: If someone says to find out the total salary of all employees without using Group Function here we need to use the loop on PL/SQL block. today we will show how to find out the Total Salary Without Using Group Function.



DECLARE
    v_sal   NUMBER := 0;
BEGIN
    FOR i IN (SELECT Salary FROM Employees)
    LOOP
        v_sal := v_sal + i.Salary;
    END LOOP;
END;








No comments

Theme images by Deejpilot. Powered by Blogger.