目标表存在

带条件复制

  1. insert into t1 select * from t2 where id < 5;

指定数据列

  1. insert into t1 select c1, c2 from t2 where id < 5;

可插入常量

  1. insert into t1 select generate_series(1,10),'constant';

目标表不存在

指定数据列,带条件复制

  1. select c1, c2 into t1 from t2 where id < 5;