Saturday, April 14, 2012

SQL Update Multiple Columns

Below Sql use to update multiple column for a table in 1 shot


*****************

UPDATE Table1
SET (Col1Col2Col3Col4) = 
(SELECT Col1aCol2aCol3aCol4a FROM Table2 WHERECol5a=Table1.Col5
WHERE Col5 IN (SELECT Col5a FROM Table2 )

*****************

No comments: