MySQL/INSERT INTO:修订间差异
来自康健生活
| 第29行: | 第29行: | ||
INSERT INTO table_1(field_1, field_2) | INSERT INTO table_1(field_1, field_2) | ||
SELECT a.field_3 as field_1, b.field_4 as field_2 FROM table_2 AS a | SELECT a.field_3 as field_1, b.field_4 as field_2 FROM table_2 AS a | ||
LEFT JOIN table_3 as b ON a.filed = b.filed;</syntaxhighlight>|<syntaxhighlight lang="bash"> | LEFT JOIN table_3 as b ON a.filed = b.filed | ||
WHERE 1 = 1;</syntaxhighlight>|<syntaxhighlight lang="bash"> | |||
</syntaxhighlight>|$|/home/kangkk}} | </syntaxhighlight>|$|/home/kangkk}} | ||