troubleshooting Question

Select Rows including their SUM in the last

Avatar of Jagdish Devaku
Jagdish Devaku asked on
Microsoft SQL ServerMicrosoft SQL Server 2008Microsoft SQL Server 2005
10 Comments4 Solutions682 ViewsLast Modified:
Hi,

I have requirement as below:

My table:

Name      Amount
Raj      100
Manj      200
Jag      300
John      400


Required Result:
Name      Amount
Raj      100
Manj      200
Jag      300
John      400
Total      1000


I tried using UNION and it working.

But I want to write this in one query. or any other better way without using UNION or temp tables.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 4 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros