Copy one column to another sqlserver

UPDATE table SET columnB = columnA --This will update every row. UPDATE table_name SET destination_column_name=orig_column_name WHERE condition_if_necessary --This will update rows which satisfy the WHERE clause UPDATE table1 SET column1 = ( SELECT column2 FROM table2 WHERE table2.id = table1.id ); Whereby: table1 = table that has the column that needs to be updated table2 … Continue reading Copy one column to another sqlserver

Advertisements