Re: multiple row insertion

From: "test tester" <test896(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: multiple row insertion
Date: 2007-10-04 13:47:01
Message-ID: 4640d9b40710040647q6693cb41qefcd6da7f3312d49@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/4/07, test tester <test896(at)gmail(dot)com> wrote:
>
> i have version 8.1 and i want to know how to insert multiple rows in this
> version.
>
> On 10/4/07, Ashish Karalkar < ashish(dot)karalkar(at)info-spectrum(dot)com> wrote:
> >
> > INSERT INTO qsweb.core_board(board_name, entry_user_id, entry_date)
> > VALUES ('a',1,now()),('b',1,now());
> >
> > ----- Original Message -----
> > *From:* test tester <test896(at)gmail(dot)com>
> > *To:* pgsql-general(at)postgresql(dot)org
> > *Sent:* Thursday, October 04, 2007 4:49 PM
> > *Subject:* [GENERAL] multiple row insertion
> >
> > In MySQL, I can insert multiple rows like this:
> >
> >
> > insert into cars values(5, "toyota"),(5,"ford"), etc.
> >
> >
> > How can I do something similiar in PostgreSQL?
> >
> >
> > insert into cars (id,name) values (1,'toyota'),(2,'ford');
> >
> > With Regards
> > Ashish
> >
> >
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-10-04 13:52:16 Re: ERROR: variable not found in subplan target lists
Previous Message Miroslav Šulc 2007-10-04 13:35:20 Re: ERROR: variable not found in subplan target lists