sql - update column of table with other column -


i hava table a

col1    col2 ------------- 1         2         hhhh 3         erer 4         sdfsdfds 5          alimd 

table has relationshib other tables.

and other table name b

col1     col2 ---------------- 1        hhjgjh 2         jkkjerwe 3          jjjjj 

tables , b have milions of records

question : want update col2 of table col2 of table b

the best , speed of query update

thanks

update set a.col2 = b.col2 tablea inner join tableb b on a.col1 = b.col1  

demo


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -