Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 361E5B5DC26 for ; Thu, 25 Aug 2011 06:48:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 68349-02 for ; Thu, 25 Aug 2011 09:48:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mxin.ulb.ac.be (mxin.ulb.ac.be [164.15.128.112]) by mail.postgresql.org (Postfix) with ESMTP id 7C41DB5DC02 for ; Thu, 25 Aug 2011 06:48:27 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQCAFMUVk6kD30E/2dsb2JhbAAMNoRMlCGRSwEBBSNmCxgJIQICDwJGEwYCAQGxTJFPhTuBEQSOEYoGi38 Received: from bebif01.ulb.ac.be (HELO [10.0.0.194]) ([164.15.125.4]) by smtp.ulb.ac.be with ESMTP; 25 Aug 2011 11:48:26 +0200 Message-ID: <4E561A6A.60807@ulb.ac.be> Date: Thu, 25 Aug 2011 11:48:26 +0200 From: Julien Cigar Organization: Belgian Biodiversity Platform User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:6.0) Gecko/20110817 Thunderbird/6.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: new table with a select References: <20110825104435.68556k0yyck63vr7@mail.sapo.pt> In-Reply-To: <20110825104435.68556k0yyck63vr7@mail.sapo.pt> Content-Type: multipart/mixed; boundary="------------040208010603040203080905" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.432 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.532 X-Spam-Level: X-Archive-Number: 201108/102 X-Sequence-Number: 35770 This is a multi-part message in MIME format. --------------040208010603040203080905 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit create table foo as select * from bar; just add "where 1=2" if you just want the schema On 08/25/2011 11:44, ppdcc@sapo.pt wrote: > > > Hello to all, > > > Can anybody tell me the sql instruction to create a new table with a > select of other table? > > I need to create a new table based on paralell of a table of lines. Can > anybody post to me a example? > > Can?t be a buffer, must be lines. > > Thanks > > > > > > > -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. --------------040208010603040203080905 Content-Type: text/x-vcard; charset=utf-8; name="jcigar.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="jcigar.vcf" begin:vcard fn:Julien Cigar n:Cigar;Julien org;quoted-printable:Belgian Biodiversity Platform;ULB (Universit=C3=A9 Libre de Bruxelles) adr:;;;Brussels;;;Belgium email;internet:jcigar@ulb.ac.be tel;work:+32(0)26505752 x-mozilla-html:FALSE url:http://www.biodiversity.be version:2.1 end:vcard --------------040208010603040203080905--