Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

How to take sum of column with same id and different table in SQL?

select t2.szCustId
     , t2.bAllowToCredit
     , sum(t1.decCreditLimit) as decCreditLimit 
from table1 t1
join table2 t2 on t1.szCustId = t2.szCustId
group by t2.szCustId
       , t2.bAllowToCredit
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #sum #column #id #table
ADD COMMENT
Topic
Name
1+1 =