Cnbaby 发表于 2016-10-20 05:46:17

mysql 把select结果保存为临时表,有2种方法

  mysql 把select结果保存为临时表,有2种方法
第一种,建立正式的表,此表可供你反复查询
drop table if exists a_temp;
create table a_temp as
select 表字段名称 from 表名称
  或者,建立临时表,此表可供你当次链接的操作里查询.
create temporary table 临时表名称
select 表字段名称 from 表名称
页: [1]
查看完整版本: mysql 把select结果保存为临时表,有2种方法