+ 1
How to have the sum of 2 tables in one row?
I am working on a project in Java using SQL queries. I am stuck in finding the sum of 2 different column of a table in a query. should I use join or sql1, sql2 in the try and catch?
4 Réponses
+ 9
u mean u r doing database connectivity using MySQL & JAVA ,
//one more thing that u can't find sum of tables ... might u mean that u want to find sum of particular columns of a same table or from two different tables
//i hv an idea for doing that
// firstly take out the column of a particular record from both the tables
//then simple add them
//note : but if u want for all records at the same time then no idea
+ 2
can you elaborate your question plz
+ 2
You cannot sum tables, you sum fields (columns), JOIN mix fields from several tables, does not sum anything either, can you give more details on what it is you're trying to achieve?
0
Hi I would try: answer= (sum column A)+(sum column B)