Re:

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Joseph Syjuco <joseph(at)asti(dot)dost(dot)gov(dot)ph>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re:
Date: 2001-09-03 17:35:10
Message-ID: Pine.LNX.4.30.0109031933410.4304-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joseph Syjuco writes:

> im new in postgresql (actually came from SQL Server) and i was trying a
> script like this
>
> insert into table1(field1,field2) values (select field1, field2 from table
> 2);

The correct syntax is:

INSERT INTO table1 (field1, field2) SELECT field1, field2 FROM table2;

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

  • at 2001-09-03 09:02:36 from Joseph Syjuco

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-09-03 17:45:45 Re:
Previous Message Joe Conway 2001-09-03 17:05:51 Re: