Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Update Select Mysql

UPDATE
    `table1` AS `dest`,
    (
        SELECT
            *
        FROM
            `table2`
        WHERE
            `id` = x
    ) AS `src`
SET
    `dest`.`col1` = `src`.`col1`
WHERE
    `dest`.`id` = x
;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Update #Select #Mysql
ADD COMMENT
Topic
Name
5+3 =