Can anyone tell me how to add up values in different tables? For example
Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) = n
Thanks
Peter
[snip]
Can anyone tell me how to add up values in different tables? For example
Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) = n
[/snip]
SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id = n
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
Can anyone tell me how to add up values in different tables? For example
Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) =3D n
[/snip]
SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id =3D n
The above doesn't work I'm afraid.
Peter
Subject
Tables/sum
Can anyone tell me how to add up values in different tables? For example
Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) = n
Thanks
Peter
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean
[snip]
Can anyone tell me how to add up values in different tables? For example
Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) =3D n
[/snip]
SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id =3D n
The above doesn't work I'm afraid.
[/snip]
Don't be afraid, you must join the
[snip]
[snip]
Can anyone tell me how to add up values in different tables? For example
Table1.Column1 + Table2.Column2 + Table1.Column3 Where id(row) =3D n
[/snip]
SELECT t1.c1 + t2.c2 + t3.c3 FROM table WHERE id =3D n
The above doesn't work I'm afraid.
[/snip]
Don't be afraid, you must join
Ok here is what I'm trying to do.
Table 1 Table 2
Table 3
Column1(id) Column2 (score) Column1(id) Column2(score)
Column1(id) Column2(name)
110
Peter South wrote:
Ok here is what I'm trying to do.
Table 1 Table 2
Table 3
Column1(id) Column2 (score) Column1(id) Column2(score)Column1(id) Column2(name)
1