I have a table called officials , with the following fields and values:
nome salário
a 10
b 100
c 30
d 40
I have a second table called official_more_caro , with the same fields as above, but with no records.
nome salário
* *
I need the official_material table to always be updated with data from the employees table of the individual with the highest salary. p>
For example, with the above data the table official_more_caro would look like this:
nome salário
b 100
I do not want the official_name_table table to always be populated with new values, but updated , ie there will always be only 1 record, who is the most expensive employee.
I do not know how to do this (I'm a beginner on this subject). Could someone help me?