sql - MySql SUM() function -
Is it possible to use the MySql SUM () function inside another MySql SUM () function ??
Table 1, like Table 1 below. Table = 2 = Select Table (Table 1. Column 1 + SUM (Table 2. Column 2 + Table 2. Column 3)) Table 1 Insert Table 1.id = Table2.table1_id where Table 1 Column 2 = 'Test' ";
Thanks
Just need a SUM ())
:
SELECT SUM (Table 1. Column 1 + Table 2. Column 2 + Table 2. Column 3) ..
or use SUM ()
on each field:
SELECT SUM (Table1.Column1) + SUM ( Table 2. Column 2) + SUM (Table2.Column3) ...
Comments
Post a Comment