Re: INSERT... WHERE
От
Chris Angelico
Тема
Re: INSERT... WHERE
Дата
Msg-id
CAPTjJmqKotELvFfhFFRXGTatEE7KtU2R+neEzf8DKRXhxQ=1EQ@mail.gmail.com
Ответ на
Re: INSERT... WHERE (Robert James)
Список
Дерево обсуждения
INSERT... WHERE Robert James <srobertjames@gmail.com>
Re: INSERT... WHERE Darren Duncan <darren@darrenduncan.net>
Re: INSERT... WHERE Serge Fonville <serge.fonville@gmail.com>
Re: INSERT... WHERE Serge Fonville <serge.fonville@gmail.com>
Re: INSERT... WHERE Ian Lawrence Barwick <barwick@gmail.com>
Re: INSERT... WHERE Robert James <srobertjames@gmail.com>
Re: INSERT... WHERE Abel Abraham Camarillo Ojeda <acamari@the00z.org>
Re: INSERT... WHERE Chris Angelico <rosuav@gmail.com>
Re: INSERT... WHERE Robert James <srobertjames@gmail.com>
Re: INSERT... WHERE David Johnston <polobo@yahoo.com>
Re: INSERT... WHERE Chris Angelico <rosuav@gmail.com>
Re: INSERT... WHERE Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: INSERT... WHERE Scott Marlowe <scott.marlowe@gmail.com>
On Mon, Jan 14, 2013 at 3:37 PM, Robert James 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
В списке pgsql-general по дате отправления