1
I have the following structure:
BUYING
id_compra  
desc_compra  
valortotal_compra  
data_compra  
id_colaborador  
COMPRAPROD
id_compraprod  
id_compra  
id_produto  
qtd_compraprod  
valorunit_compraprod  
valortotal_compraprod  
COMPRADAT
id_compramat  
id_compra  
id_material  
qtd_compramat  
valorunit_compramat  
valortotal_compramat  
I would like the field total purchase price, of the PURCHASE table, receive the sum of the values value_compraat and value_compraprod, of the COMPRAAT and COMPRAPROD tables, respectively.