Re: newbie sql question... - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Re: newbie sql question...
Date
Msg-id 3ED2FA3C.4010500@mega-bucks.co.jp
Whole thread Raw
In response to newbie sql question...  (Jason Ziegler <moo@zigfam.org>)
List pgsql-general
Jason Ziegler wrote:
>
> I have a query that works in mysql:
> "INSERT INTO table1 ( id, column2, column3 ) VALUES ( '1', 'text stuff',
> 'text stuff' ), ( '2', 'more text', 'even more text')"

I'm not SQL expert bunt I don't think the INSERT statement will let you
insert more than one set of values at a time. You need to do one INSERT
for each set of values. Someone *will* correct me if I am wrong :)

You need:

INSERT INTO table1 ( id, column2, column3 ) VALUES ( '1', 'text stuff',
'text stuff' );
INSERT INTO table1 ( id, column2, column3 ) VALUES ( '2', 'more text',
'even more text');

HTH,

Jean-Christian Imbeault




pgsql-general by date:

Previous
From: "Nikola Milutinovic"
Date:
Subject: PostgreSQL 7.3.1 on WinXP
Next
From: "Vincent Hikida"
Date:
Subject: Re: newbie sql question...