Search Postgresql Archives

Re: Can I use a query with UPDATE on its SET?

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

 



Eus wrote:
> Hi Ho!
> 
> Since I can do:
> 
> INSERT INTO table (SELECT a_transaction.*);
> 
> I am wondering whether I can do:
> 
> UPDATE table SET (SELECT a_transaction.*) WHERE primary_key = (SELECT a_transaction.primary_key);

UPDATE table SET fieldname = (SELECT ..) WHERE primary_key = (SELECT...)

--
Craig Ringer

-- 
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