SQL Associated Query & Modify fields, the correct example is as follows:
--Batch Change report unit name & Update time--TT and TP Two Table association query, update the principal field in the Eligible TT table to the Ruperson field of the TP table merge into Nhis34.t_publicplaces Tpusing standard.t_organization Tton (Tt.orgcode = Tp.r_orgcode and Tp.create_time > ' 2015-05-07 00:00:00 ') when Matche D then update set Tp.ruperson = Tt.principal, Tp.update_time = ' 2015-05-07 09:12:08 ';
The error example is as follows:
--The following is the error statement/*update nhis34.t_publicplaces Set Ruperson = (select Tt.principal from nhis34.t_publicplaces TP Left JOIN Standard.t_organization tt on tt.orgcode = tp.r_orgcode where Tp.create_time > ' 2015-05-07 00:00:00 '); * *
The above error example will report the following error:
650) this.width=650; "title=" 0000000000000.png "src=" http://s3.51cto.com/wyfs02/M02/6C/88/ Wkiom1vljzcddel3aab54qyq2n8981.jpg "alt=" Wkiom1vljzcddel3aab54qyq2n8981.jpg "/>
This article is from the "Pig Flying" blog, please be sure to keep this source http://jiyanle.blog.51cto.com/6932197/1643928
SQL Two Table association query & bulk Modify field values