Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id F318B9F9D57 for ; Thu, 6 Sep 2007 04:49:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 01439-08 for ; Thu, 6 Sep 2007 04:49:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from pro33.abac.com (pro33.abac.com [66.226.64.34]) by postgresql.org (Postfix) with ESMTP id 0FE279F9C96 for ; Thu, 6 Sep 2007 04:49:03 -0300 (ADT) Received: from ashishk ([220.227.213.66]) (authenticated bits=0) by pro33.abac.com (8.14.1/8.14.1) with ESMTP id l867mNam023853 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Thu, 6 Sep 2007 00:48:49 -0700 (PDT) (envelope-from ashish.karalkar@info-spectrum.com) Message-ID: <018f01c7f05a$653bf6e0$170211ac@LIONKING.COM> From: "Ashish Karalkar" To: "hu js" , References: Subject: Re: How to use serial variable to insert into muiti-recrods? Date: Thu, 6 Sep 2007 13:18:23 +0530 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/55 X-Sequence-Number: 29268 I think default is a key word whic u r using as a column name in select statment. With Regards Ashish... ----- Original Message ----- From: "hu js" To: Sent: Thursday, September 06, 2007 12:41 PM Subject: [SQL] How to use serial variable to insert into muiti-recrods? > run: > "CREATE TABLE xxx > ( > id serial NOT NULL, > name character varying > ); > insert into xxx select default values,place_name from air_bui;" > > fail: > "ERROR: syntax error at or near "default" > SQL state: 42601 > Character: 24" > > How can I do? > > Bill Gates > > _________________________________________________________________ > 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq