X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 58E10D72AA for ; Fri, 14 Oct 2005 11:48:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07440-09 for ; Fri, 14 Oct 2005 14:48:02 +0000 (GMT) Received: from web8609.mail.in.yahoo.com (web8609.mail.in.yahoo.com [202.43.219.84]) by svr1.postgresql.org (Postfix) with SMTP id 4FB41D83CB for ; Fri, 14 Oct 2005 11:48:03 -0300 (ADT) Received: (qmail 57203 invoked by uid 60001); 14 Oct 2005 14:48:05 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=O87cs3cjiHBCr6TcM4pdsfJrPYxVj+dcKd30M9x50cbnkPfR8J+EHorkvUOMocPyidGE2spgmx75xuhGj4NJvy0lk3x4CgV/sV/WSp4ErQE8y909sWyQ5Y3zaJkhZ9XYH1D8sRfopqFX6wox1LCd05kDG/vvVNvKeavaeYj6dck= ; Message-ID: <20051014144805.57201.qmail@web8609.mail.in.yahoo.com> Received: from [12.109.150.2] by web8609.mail.in.yahoo.com via HTTP; Fri, 14 Oct 2005 15:48:05 BST Date: Fri, 14 Oct 2005 15:48:05 +0100 (BST) From: Muralidharan Ramakrishnan Subject: Re: copy table To: Shavonne Marietta Wijesinghe , pgsql-sql@postgresql.org In-Reply-To: <004801c5d09b$747fad80$1102a8c0@dream> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1711589340-1129301285=:55625" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.453 required=5 tests=[AWL=-0.325, DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, HTML_60_70=0.027, HTML_MESSAGE=0.001] X-Spam-Level: * X-Archive-Number: 200510/163 X-Sequence-Number: 23016 --0-1711589340-1129301285=:55625 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit INSERT INTO MYSCHEMA2.TABLENAME SELECT * FROM MYSCHEMA1.TABLENAME WHERE < CONDITION > Shavonne Marietta Wijesinghe wrote: Hello How can i copy a table from one schema to another.. Example.. * I have a database "mydatabase" * then i have 2 schemas "myschema1" and "myschema2" * in "myschema1" i have inserted a new line and i want to copy that to "myschema2" so they both will be same.. How can i do it with SQL ?? I use pgadmin 3 to make my database in postgresql thank u --------------------------------- Yahoo! India Matrimony: Find your partner now. --0-1711589340-1129301285=:55625 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
INSERT INTO MYSCHEMA2.TABLENAME
     SELECT * FROM MYSCHEMA1.TABLENAME WHERE < CONDITION >

Shavonne Marietta Wijesinghe <shavonne.marietta@studioform.it> wrote:
Hello
 
How can i copy a table from one schema to another..
 
Example..
 
* I have a database "mydatabase"
* then i have 2 schemas "myschema1" and "myschema2"
* in "myschema1" i have inserted a new line and i want to copy that to "myschema2" so they both will be same..
 
How can i do it with SQL ??
 
I use pgadmin 3 to make my database in postgresql
 
thank u


Yahoo! India Matrimony: Find your partner now. --0-1711589340-1129301285=:55625--