I have below table having three columns(Empno,Ename,Salary)
Empno Ename Salary
101 Ashok 1000
102 Kumar 2000
103 Mani 3000
I need below Output by displaying difference in salary.
Empno Ename Salary Difference_in_Salary
101 Ashok 1000 1000
102 Kumar 2000 1000
103 Mani 3000 1000
There are many ways to calculate a "difference" as it depends what you want the difference from:
Which, for your sample data:
Outputs:
db<>fiddle here