How to get to the total/sum at the end of the production

How can I get an output like below using SQL statements only;

ENAME SAL
------------ ---
SMITH, 800
KING 5000
ADAMS 1100
Total 6900

Best regards, Yacoub
SELECT ENAME , Sal
FROM EMP
UNION
SELECT 'TOTAL' A , SUM(Sal)
FROM EMP
GROUP BY 'TOTAL'

Published by: AJ99 on July 6, 2009 14:57

Tags: Database

Similar Questions

Maybe you are looking for