CREATE TABLE ~ as SELECT ~
sqlite에서 table을 생성할 때 as select 문을 이용하면 select 된 table을 생성될 table에 복사하게 된다. sqlite> create table a(b text); sqlite> insert into a values(1); sqlite> insert into a values(2); sqlite> insert into a values(3); sqlite> select * from a; 1 2 3 sqlite> create table b as select * from a; sqlite> select * from b; 1 2 3