Re: - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re:
Date
Msg-id Pine.LNX.4.30.0109031933410.4304-100000@peter.localdomain
Whole thread Raw
In response to  ("Joseph Syjuco" <joseph@asti.dost.gov.ph>)
List 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@gmx.net   http://funkturm.homeip.net/~peter



pgsql-sql by date:

Previous
From: Chris Ruprecht
Date:
Subject: More on the TO DO wishlist
Next
From: Michael Davis
Date:
Subject: Re: