creating table without columns

From: Subodh Kumar <subodh(dot)kumar(at)epps-erp(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: creating table without columns
Date: 2018-10-30 11:52:29
Message-ID: CA+KMk93CwQBP8SMeu_wcGdrj_ZTLVQVDpL-zbCd2vdy0hfWYrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello Everyone,
I have run below query it is created 'test' table without
columns
but table row count is 2.
please give me clarity about this, i thought it may give syntax error but
not
either it must have 2 rows data but both are not happened.

with ins_test as (select 1 as srno
union
select 2)
select into test from ins_test;

select * from test;

thank you.

Regards:
Subodh Kumar
Postgresql Developer

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2018-10-30 12:17:14 Re: Getting fancy errors when accessing information_schema on 10.5
Previous Message Axel Rau 2018-10-30 11:32:08 Re: Getting fancy errors when accessing information_schema on 10.5