Re: duplicating table - Mailing list pgsql-general

From Stephan Szabo
Subject Re: duplicating table
Date
Msg-id 20020110080606.H82370-100000@megazone23.bigpanda.com
Whole thread Raw
In response to duplicating table  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
> I can alter the table to add the two
> new columns, but I wanted to know if
> I can copy the data from the old table
> into the new table and put the column
> data in the appropriate places
> (leaving column: address2 and mailcode empty)?
>
> I have been trying something like:
>
> [example]
>
> insert into t2_ref_pcg_address
> select name,riskgrp,address,,city,state,zi p,pcgname from t_ref_pcg_address;

It'd probably work if you used NULL or '' where address2 belongs (the two
commas next to each other is probably your problem there).


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Query planner isn't using my indices
Next
From: Doug McNaught
Date:
Subject: Re: Performance tips