Comparing two csv files and change the values in the condition?

There are two csv file.
1st:
Name;SKU;Code;Balance
Coal;01ug;00000102;0
Firewood;DR;00000406;9
Peat;TF;00000803;1
Gas;G1Z;00000412;5

2nd
Code;The Rest Of
00000406;15
00000803;6

Can you please tell me the options to overwrite the values of the column "balance" in the first file, taking them from the second. It is possible, even forming a third file consisting of only those "Codes", the balance of which is updated.
July 8th 19 at 16:18
1 answer
July 8th 19 at 16:20
Solution
Thank you. How to upload/download to/from table (s) understood. But then I do not know what to do. :) - jace.Bogan51 commented on July 8th 19 at 16:23
In the first table, select the field Code as a unique index.
Then
INSERT INTO `table1` (SELECT 1,1,`kod`,`ostatok` FROM `table2`) ON DUPLICATE KEY UPDATE `ostatok`=VALUES(`ostatok`)

Well, or something like that. Too lazy to check. - Marty93 commented on July 8th 19 at 16:26

Find more questions by tags LinuxCSVAWKbashsed