Search Postgresql Archives

Re: INSERT... WHERE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/13/13, Chris Angelico <rosuav@xxxxxxxxx> wrote:
> On Mon, Jan 14, 2013 at 3:37 PM, Robert James <srobertjames@xxxxxxxxx>
> wrote:
>> Thanks.  But how do I do that where I have many literals? Something like:
>>
>> INSERT INTO seltest (id, a, b) SELECT (1,2,3),(4,5,6),(7,8,9) WHERE b
>> IN (SELECT ...)
>
> You can use WITH clauses in crazy ways with PostgreSQL. I haven't
> actually tried it, but you should be able to put your VALUES behind a
> WITH, then SELECT from that WHERE blah blah, and INSERT that SELECT.
>
> As they say, knock yourself out! :)
>
> ChrisA


I don't quite follow - could you please elaborate?


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux