postgresql - Merge 3 tables in one table -


i have 3 tables (t1, t2, t3) in postgresql. have same number of columns (168 cols) same type , overall 300k rows.

how can add of them in 1 table?

insert t4 select * t1 union select * t2 union select * t3 

or, if want create table during select:

select * t4 t1 union select * t2 union select * t3; 

sql fiddle example


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -