Answers for "update from in mysql"

SQL
1

on update date mysql

ALTER TABLE t1 MODIFY post_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
Posted by: Guest on April-26-2021
0

Update Select Mysql

UPDATE
    `table1` AS `dest`,
    (
        SELECT
            *
        FROM
            `table2`
        WHERE
            `id` = x
    ) AS `src`
SET
    `dest`.`col1` = `src`.`col1`
WHERE
    `dest`.`id` = x
;
Posted by: Guest on October-02-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language