Home >> MySql >> How to update a column with another tables columns value in MySql

How to update a column with another tables columns value in MySql

UPDATE `product` LEFT JOIN (SELECT  `item_id`,`price` FROM `item`) `temptable` ON `product`.`item_id`=`temptable`.`item_id` SET `product`.`price`=`temptable`.`price`

Post Your Comment

Next Questions
Updating one table row from another table row
Update columns values with column of another table based on condition
How to insert data in one table from another table
How to copy data from one table to another table
How to concatenate two columns into one
How to concatenate two columns into one with the existing column name
How to Concatenate Multiple Rows into One Column
How to Concatenate Multiple Rows into One Column Using Group BY
How to set GROUP_CONCAT separator
How to count duplicate rows
How to count the number of duplicate entries a column
How To Find Duplicate Values
How to Find Duplicate Records
Count duplicates records
How to find duplicate records without GROUP BY
How can remove duplicate rows
how to Find average value of top n
How to calculate an average value across rows
How to get the average of the values
How to get the average of the last X values
How to Find a minimum value for a certain column value
How to select data where a field has a min value
Select row with min value in GROUP BY
Select Rows with min value for each group
How to Find a maximum value for a certain column value

Copyright ©2022 coderraj.com. All Rights Reserved.