gpt4 book ai didi

php - 从多个表复制数据并插入到一个表中?

转载 作者:行者123 更新时间:2023-11-29 14:50:01 25 4
gpt4 key购买 nike

我想从多个表复制数据并插入到同一数据库的一个表中。我怎样才能用 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

关于php - 从多个表复制数据并插入到一个表中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5955986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com