From: | "Joe Conway" <joseph(dot)conway(at)home(dot)com> |
---|---|
To: | "Joseph Syjuco" <joseph(at)asti(dot)dost(dot)gov(dot)ph>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: |
Date: | 2001-09-03 17:05:51 |
Message-ID: | 014d01c1349a$b01727c0$0705a8c0@jecw2k1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> 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);
>
> i dont know if this is possible (inserting a set of entries via resultset
> from a select stmt in one command). If anyone has any answers, or
> workarounds pls do email me
Well, that syntax doesn't work on SQL Server either.
I think what you want is:
insert into table1(field1,field2) select field1, field2 from table2;
HTH,
-- Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-09-03 17:35:10 | Re: |
Previous Message | Jari Aalto | 2001-09-03 16:34:33 | GRANT ALL ON TO GROUP failure |