可以分两步:
create table a
as
select d as colum1
from t
where 1 = 2;insert into a
select sum(d) as colum1
from t;
create table a
as
select d as colum1
from t
where 1 = 2;insert into a
select sum(d) as colum1
from t;
create table a
as
select d as colum1
from t
where 1 = 2;
建一空表insert into a
select sum(d) as colum1
from t;
速度比较快的