X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 26924D1C47A for ; Tue, 12 Aug 2003 16:40:17 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 83113-06 for ; Tue, 12 Aug 2003 13:38:42 -0300 (ADT) Received: from irko.smoothcorp.com (unknown [208.49.241.41]) by svr1.postgresql.org (Postfix) with ESMTP id 9041AD1B53A for ; Tue, 12 Aug 2003 13:40:05 -0300 (ADT) Received: from [10.0.1.63] (helo=jgardner.smoothcorp.com) by irko.smoothcorp.com with esmtp (Exim 4.12) id 19mcBo-0002v2-00; Tue, 12 Aug 2003 09:40:04 -0700 Received: from jgardner.smoothcorp.com (localhost.localdomain [127.0.0.1]) by jgardner.smoothcorp.com (8.12.8/8.12.8) with ESMTP id h7CGe4sN022163; Tue, 12 Aug 2003 09:40:04 -0700 Received: from localhost (localhost [[UNIX: localhost]]) by jgardner.smoothcorp.com (8.12.8/8.12.8/Submit) id h7CGe3u2022161; Tue, 12 Aug 2003 09:40:03 -0700 From: Jonathan Gardner To: Silke Trissl , pgsql-sql@postgresql.org Subject: Re: INSERT INTO ... SELECT Date: Tue, 12 Aug 2003 09:40:01 -0700 User-Agent: KMail/1.5 References: <3F376E13.7080907@informatik.hu-berlin.de> In-Reply-To: <3F376E13.7080907@informatik.hu-berlin.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308120940.03131.jgardner@jonathangardner.net> X-SA-Exim-Rcpt-To: trissl@informatik.hu-berlin.de, pgsql-sql@postgresql.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/116 X-Sequence-Number: 14732 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 11 August 2003 03:21, Silke Trissl wrote: > > Is there something like > > INSERT INTO test_table (int_id, cust_id, cust_name) '1', SELECT id, > name from CUSTOMER: > > and if so, what ist the correct statement? If not, what is an > alternative to insert a single row at a time? > I'm not too sure on what you want, but I'll guess. INSERT INTO test_table (int_id, cust_id, cust_name) SELECT 1, id, name FROM customer; Does this do what you want? - --=20 Jonathan Gardner Live Free, Use Linux! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/ORhhWgwF3QvpWNwRAsoTAJ9Wq+iZ3/JbapXeS1wrv9VgR1gtAgCfVItU ZsBeXCPBuLuOgBTWn3vu2Gc=3D =3DPJDU -----END PGP SIGNATURE-----