Sorry to be askingBut can someone tell me how to add up all the columns in a table ?
Thanks!![]()
| SitePoint Sponsor |





Sorry to be askingBut can someone tell me how to add up all the columns in a table ?
Thanks!![]()
Back Again





What I actually mean is I want to total each column. I'm useing SQL 2000. I remember it being a simple function but not sure and cant remember the exact syntax![]()
Back Again





SELECT SUM( col1 ), SUM( col2 ) ...
FROM yourtable
Matt - Sybase DBA / PHP fanatic
Sybase/MySQL/Oracle | I don't like MySQL
Download Sybase | DBForums.com - for all your RDBMS talk





Thanks![]()
Back Again
Bookmarks