Hey guys I m trying to set up a quick math table and figured I can save myself some time if I created a foreign key that was the negation of two of my columns. Probably a bad idea but I think it d be a neat hat trick.
So lets say I have a table set up like this
ID | A | B | C (Foreign?)
0 | 5 | 3 | (2)
因此,这里的简单数是
A-B=C
我永远不需要不止一个字眼,但我会问,这时常通过麻省不断更新<代码>A或B
。 或获得<代码>A的数值 B & C,用于向终端用户展示。 页: 1
ID | A | B
0 | 5 | 3
SELECT A, B, (A-B) AS C
FROM `sometable`
But I figure this would be a lot of extra math on the server?