On Wed, 1 Mar 2000, Timothy Grant wrote:
> Hi again,
>
> Is there a quick and dirty way that I am missing for creating a new
> database with a slightly different schema than the old db?
>
> For example, I have a table with a DATETIME field that I really need to
> change to a DATE field.
>
> I can create a new table with that field defined as a DATE, but if I do
> the following:
>
> INSERT INTO newtable SELECT * FROM oldtable;
>
Example:
SELECT column1, column2::date, column3 INTO newtable FROM oldtable;
- where column2 is a column with your not wanted datetime and is changed to
date. You must cast to new type from old type.
Karel