Suppose you have a table:
+-------+-------+
| Item | Value |
+-------+-------+
| Tax | 1.08 |
| Water | 6 |
| Bread | 2 |
+-------+-------+
And you want to insert a row like this:
+-------+-------+
| Item | Value |
+-------+-------+
| Paper | 5*Tax |
+-------+-------+
Where the Value column is dynamically generated each time it’s retrieved, so it always accurately reflects whatever changes are made to “Tax.”
Example:
SELECT * FROM table WHERE Item = "Paper"
shows 5.40UPDATE table SET Value = 1.11 WHERE Item = "Tax"
SELECT * FROM table WHERE Item = "Paper"
shows 5.55
Is it possible to have dynamic values like this in the same table? Or is this something I would need to use a view for?