Iamlaosong
When you update multiple fields in a table normally, the fields are written separately, for example:
Update Tb_county t set t.prov_name = ' Anhui ', t.city_name = ' Hefei ', t.xs_mc = ' Luyang District ' where T.xs_code = ' 2300 ';
However, if the updated value comes from a subquery, these fields can be written together, for example:
Update Tb_county T set (T.prov_name, T.city_name, T.XS_MC) = (select T.prov_name, t.city_name, T.XS_MC From TB_YZBM t where T.postcode = ' 230000 ') where T.xs_code = ' 2300 ';
Thus, we can rewrite the first statement to be:
Update Tb_county T set (T.prov_name, T.city_name, T.XS_MC) = (select ' Anhui ', ' Hefei ', ' Luyang District ' from dual) where T.xs_code = ' 2300 ';
This is not a good thing to do with human-computer interaction, but when you programmatically implement an UPDATE statement, it is much simpler to synthesize the UPDATE statement in such a format.
How SQL Updates data when multiple fields are combined