Insert excel column into a table in MySQL

1

I have a mysql table (it has 600 records):

The edr_id column is a column that will be extracted from an excel cell, while in the tool I'm using ( MySQL for Excel ), just add and when I add the cell it's like I add more records. Is there any tool where you can do the update using the Excel cell?

    
asked by anonymous 11.02.2015 / 14:02

1 answer

2

I do not think there will be major differences from Sql for MySQL , as the example that I created did in Sql. Well, in the example, imagine that TableA corresponds to the table you have already imported, TableB will be the new imported table and will have the value of the column edr_id to be used to update its field in TableA. Here is the instruction (Sql):

update
  TabelaA
set
  edr_id = TabelaB.edr_id
from
  TabelaA
    inner join
  TabelaB
     on TabelaA.dados_cidades_id = Tabelab.dados_cidade_id

If you have any criteria do not forget to use the WHERE clause.

    
11.02.2015 / 15:33