![](/img/trans.png)
[英]Copying Data from table to another table and applying one to many relationship
[英]copying data from multiple table and insert into one?
我想從多個表復制數據並插入同一數據庫的一個表中。 我該如何使用PHP和MySQL做同樣的事情?
與您的問題一樣普遍,示例插入查詢:
insert into table3(col1, col2, col3, col4) select t1.col1, t1.col2, t2.col1, t2.col2 from table1 t1, table2 t2 where t1.idColumn = t2.colID
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.