Dharmendra (.Net)
Sunday, 22 March 2015
Sum previous Salary using sql and show all years
select EmpID,
(
select sum(sub.Salary) as Sub_Salary from Employee sub where sub.EmpID<=main.EmpID
) as Sub_Salary
from Employee main
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment