sql - How to update table without using update keyword -


i have table ,table b same columns .i want replace value in table b table value without using update keyword.

the question use bit more detail on table structure, you're trying accomplish, , precludes using update, here goes:

create table #temptable (col1, col2, col3, ...)  insert #temptable select   b.col1  , b.col2  , a.col3  , ... inner join b on a.col1 = b.col1  delete b col1 in (select col1 a)  insert b select  col1  , col2  , col3  , ... #temptable 

which of course makes bold assumption table , b share primary key, , table b doesn't have constraint prevent deletion of matched rows. please, provide more detail , i'll update answer accordingly.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -