I have tree tables
id A --------- - - 1 10 ID B ----------- 1 20 2 30 ID C ----------- 2 40 3 50 What Anybody can please tell how to print views or queries like this?
ID ABCR (A + B - C) ------------------ ------------- ---- 1 10 20 0 30 2 30 30 40 -103 50 -50 Thank you in advance.
As far as I know that there is no full external in MySql therefore, which is expected for you You should get a separate ID in the derived table and join the original table:
ids.id, ifnull (table1.A, 0) A, ifnull (table2.b, 0) b, If the table selects ID from Table 1 (Table 3. C, 0) C, if (Table 1. A, 0) + ifnull (table2.B, 0) - ifnull (table3.C, 0) Select ID from the Select ID from the ID) IDs on ID 1 Join the table on d = table1.id IID.id = table2.id becomes included in Table 2. Join in Table 3 at Id.id = table3.id. Table <3
Comments
Post a Comment