MYSQL request for data transfer from one table to another



  • Please help establish a request at Mysql for the transfer of data from the 1st specific field for all values from the old database to the new, key field.

    The structure is:

    Old bd_old.table_old

    New bd_new.table_new

    There's a field in both databases.

    We need all the values of this field from the old base.

    There's a key field of 'id' that matches both bases.



  • Use UPDATE in conjunction with JOIN, so immediately filter out all the records that match, and only update them.

    UPDATE t1
    INNER JOIN t2 on t2.id = t1.id
    SET t1.description = t2.description
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2