mysql怎么存临时表 mysql如何使用临时表( 五 )


MySQL如何使用临时表解决办法:
当临时表不存在时 , 将查询结果保存在临时表中:
CREATE TEMPORARY TABLE tmp_table SELECT * FROM table_name;
我的具体代码是
CREATE temporary table tmp
(SELECT t1.pid a, t1.pname b,t2.pid c, t2.pdescribe d FROM
(SELECT pid,pname FROM admin_advert_place WHERE pid IN (3,4,5,6,7)) t1 LEFT JOIN
(SELECT pid,pdescribe FROM admin_advert_place
WHERE pgid IN (6,7,8)) t2 ON t1.pid = t2.pid)
mysql怎么存临时表的介绍就聊到这里吧,感谢你花时间阅读本站内容 , 更多关于mysql如何使用临时表、mysql怎么存临时表的信息别忘了在本站进行查找喔 。

推荐阅读