Friday 26 August 2016

Update dependant table using inner join in mysql

Update columns value of a table using value from a column from other table is very simple and straightforward in mysql. try this..


update table_A as a
inner join table_B as b on (a.tbl_a_id=b.tbl_a_id) 
set a.columnWhoseValueToBeUpdated=b.columnFromWhereValueToBeUpdated;




No comments:

Post a Comment

Configer Sublime Text Editor to compile and run java program

Sublime Text is an editor which has the balance between simplicity and power. Many programmers are using Sublime for their daily program...