Skip to content
Advertisement

adding summary row to the end of the table

Hi I have a table with 4 columns. the table is as below

Now i want the totals summary row at the bottom of the table. Please look at the image file below. how can i achieve this?

enter image description here

Advertisement

Answer

You can use UNION ALL as below

SqlFiddle Demo

1st column is converted to varchar becouse you want to Total word atthe bottom. Columns types in UNION must be the same type.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement