MySQL Insert & Joins

后端 未结 3 1475
庸人自扰
庸人自扰 2020-11-30 06:40

i saw this

In MySQL, joins work for INSERT, UPDATE, and DELETE statements. It\'s possible to change data in more than one table when joining ta

3条回答
  •  感动是毒
    2020-11-30 07:33

    You can INSERT ... SELECT with mysql, which is probably what they mean. For example:

    INSERT INTO tableNew (col1, col2)
      SELECT tbl1.col1, tbl2.col2
      FROM tbl1 JOIN tbl2
    

提交回复
热议问题