Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

update table from another table

UPDATE accounts SET (contact_first_name, contact_last_name) =
    (SELECT first_name, last_name FROM salesmen
     WHERE salesmen.id = accounts.sales_id);
Source by www.postgresql.org #
 
PREVIOUS NEXT
Tagged: #update #table #table
ADD COMMENT
Topic
Name
8+8 =