select 'sal' as A, sal as B, sal as C, sal as D
(Select sum(sal) sal from emp)
union all
select
'comm', comm, comm, comm
(Select sum(comm) comm from emp)
union all
select rpad('-',10,'-') ,rpad('-',10,'-'),rpad('-',10,'-'),rpad('-',10,'-') from emp;
Getting following error when running the above query. I know that it is because of rpad('-',10,'-') what is the best way to acheive expected output
I would like to have the result with underline. what is the best way to acheive it.
Expected output:
I am developing report.
I need to have the following oupput.
How can i put underline after the records.
A B C D
sal 29025 29025 29025
comm 2200 2200 2200
--------------------------------------------------