Re: Moving a table to a different schema

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Moving a table to a different schema
Date: 2003-05-29 18:31:04
Message-ID: 20030529183104.GN14390@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 29, 2003 at 11:14:22AM -0500, Jim C. Nasby wrote:
> Is there a command to move an existing table to a different schema?

CREATE TABLE targetschem.tablename AS
SELECT * FROM sourceschem.tablename

would work.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Eckermann 2003-05-29 18:31:43 Re: exporting join results
Previous Message nolan 2003-05-29 18:18:01 Re: How to deny user changing his own password?