Re: newbie sql question...

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: Jason Ziegler <moo(at)zigfam(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: newbie sql question...
Date: 2003-05-27 05:40:12
Message-ID: 3ED2FA3C.4010500@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Hikida 2003-05-27 05:52:50 Re: newbie sql question...
Previous Message Nikola Milutinovic 2003-05-27 05:29:48 PostgreSQL 7.3.1 on WinXP