Skip site navigation (1) Skip section navigation (2)

Re: Create an empty copy of another table

From: <davidb(at)vectormath(dot)com>
To: "Thomas Weholt" <Thomas(at)cintra(dot)no>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Create an empty copy of another table
Date: 2000-06-28 14:32:01
Message-ID: 000601bfe10d$a21dce30$0602010a@bullwinkle.vectormath (view raw or flat)
Thread:
Lists: pgsql-novice
I don't have time to test it out right now, but it
should be something like this:

SELECT * INTO tblTemp FROM tblExistingTable WHERE
nFieldOne = 5;

Look in the docs under SELECT INTO

David Boerwinkle
-----Original Message-----
From: Thomas Weholt <Thomas(at)cintra(dot)no>
To: 'pgsql-novice(at)postgresql(dot)org'
<pgsql-novice(at)postgresql(dot)org>
Date: Wednesday, June 28, 2000 9:29 AM
Subject: [NOVICE] Create an empty copy of another
table


>Hi,
>
>How do I create a new empty table that`s a copy
of an allready existing one?
>I need a way of putting the result of a
select-statement into a temporary
>table that`s an exact copy of the table it`s
derived from and I`m not sure
>how to do this. Obviously. I am just using one
table to query at the time.
>
>Thomas


pgsql-novice by date

Next:From: Tobias DittrichDate: 2000-06-29 10:15:04
Subject: Problems with Installation
Previous:From: Andrew McMillanDate: 2000-06-28 13:48:12
Subject: Re: Create an empty copy of another table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group