![](/img/trans.png)
[英]MySQL Insert Into Table From Multiple Tables Using Separate SELECT Queries
[英]mysql insert into table from multiple select queries
我如何将其组合成单个插入物
INSERT INTO masterTable (count1) select count(*) as count1 from tablex
INSERT INTO masterTable (count2) select count(*) as count2 from tabley
INSERT INTO masterTable (count3) select count(*) as count3 from tablez
INSERT INTO MasterTable (count1,count2,count3)
VALUES ((select count(*) from tablex),(select count(*) from tabley),(select count(*) from tablez))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.