This question has already been answered:

Hello!

There are two tables:

Table1

+------------+---------------------------- | id | Annotation1 | Text | +------------+---------------------------- | 12 | | 34 | | 13 | | 12 | | 2032 | | 51 | +------------+---------------------------- 

Table2

  +------------+---------------- | id | Annotation2 | +------------+---------------- | 12 | текст 1 | | 13 | текст2 | | 2032 | текст 3 | +------------+---------------- 

Tell me which SQL query to write in the Annotation1 column to write the values ​​from Annotation2 in accordance with the id ?

Reported as a duplicate by members Mike , AK , Akina , ermak0ff , Denis Bubnov Jan 30 '17 at 6:09 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    Found it myself:

     UPDATE prefix_topic, prefix_topic_content SET prefix_topic.annotation = prefix_topic_content.annotation WHERE prefix_topic.id = prefix_topic_content.id;