Re :Setting default row value after select into table

From: "Imtiaz(dot) S(dot) M" <imtiaz_sm(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re :Setting default row value after select into table
Date: 1999-10-29 13:36:28
Message-ID: 3819A2DC.7EE6C077@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Try this

create table newtable as select set_of_columns from oldtable

Rich Ryan wrote
When I do somthing like
select cdate into table newt from oldt;
and say, row cdate in table oldt had a default value of 'now', the new
table
newt doesn't have the default value anymore. This makes sense since it
is
copying just data, not meta-data into the new table. So, is there a way
to
alter the cdate row in the new table to have a default? Could not find
an
alter table command for this.
Thanks,
Rich

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 1999-10-29 13:44:55 Re: [SQL] Problem with datetime
Previous Message Imtiaz. S. M 1999-10-29 13:18:29 Re: Re: [SQL] SQL Problem