Bulk Record Update with SQL

前端 未结 5 1467
你的背包
你的背包 2020-12-05 02:48

I have two tables in a SQL Server 2008 environment with the following structure

Table1
- ID
- DescriptionID
- Description

Table2
- ID
- Description
<         


        
5条回答
  •  广开言路
    2020-12-05 03:35

    Or you can simply update without using join like this:

    Update t1 set  t1.Description = t2.Description from @tbl2 t2,tbl1 t1
    where t1.ID= t2.ID
    

提交回复
热议问题