Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
postgresql に 3 つのテーブル (t1、t2、t3) があります。それらはすべて、同じタイプと全体で300k行の同じ数の列 ( 168列) を持っています。
それらすべてを 1 つのテーブルに追加するにはどうすればよいですか?
insert into t4 select * from t1 union all select * from t2 union all select * from t3
または、選択中にテーブルを作成する場合:
select * into t4 from t1 union all select * from t2 union all select * from t3;
SQL フィドルの例