CodePudding user response:
UPDATE a
The Set a. [need to be updated to the same field]=b. section_name
The FROM t_contract_base_area a
INNER JOIN t_contract b On b. ID=a.f contract_id
CodePudding user response:
- 1. Add a list
The alter table t_contract_base_area add fsection_name nvarchar (50)
- 2. Updated table
Update A
The SET A.f section_name=b. section_name
The from t_contract_base_area as A inner join t_contract as B on A.f contract_id=B.I D