Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

update from select postgresql

UPDATE
  <table1>
SET
  customer=subquery.customer,
  address=subquery.address,
  partn=subquery.partn
FROM
  (
    SELECT
      address_id, customer, address, partn
    FROM  /* big hairy SQL */ ...
  ) AS subquery
WHERE
  dummy.address_id=subquery.address_id;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #update #select #postgresql
ADD COMMENT
Topic
Name
6+3 =