What is the best way to replicate a column from one table to another table dynamically so that as values in table one change they are reflected in table 2?
I ask because I am trying to calculate values for a field based on other fields in the same table. When I try to do so I get this error:
ERROR 1093 (HY000): You can't specify target table 'table' for update in FROM clause
So I think my solution is to have a seperate table to write the value into, but in order to do that I need to replicate the key from the original table.
Anyone have any ideas?
I ask because I am trying to calculate values for a field based on other fields in the same table. When I try to do so I get this error:
ERROR 1093 (HY000): You can't specify target table 'table' for update in FROM clause
So I think my solution is to have a seperate table to write the value into, but in order to do that I need to replicate the key from the original table.
Anyone have any ideas?