"Go" SQL multi-table federated update

Source: Internet
Author: User
Tags sql server example

SQL Update Multi-Table Federated Update method (1) SQLite Multi-Table Update method
UpdateT1SetCol1=T2.col1 fromtable1 T1Inner JoinTable2 T2 onT1.col2=t2.col2# This is a very simple batch update statement that supports this syntax in SQL Server SQLite but does not support #sqlite in the conversion to the following syntaxUpdateTable1SetCol1=(SelectCol1 fromTable2whereCol2=table1.col2)UpdateTa_jbnt_tzhd_pht_area_xiangSetT1=(SelectSys_xzqhdm.name fromSYS_XZQHDMwhereT2=Sys_xzqhdm.code)
(2) SQL Server Multi-table Update method
#SQL Server Syntax:UPDATE{table_name with(<table_hint_limited> [. .. n])|view_name|rowset_function_limited}SET{column_name={Expression| DEFAULT| NULL}| @variable =Expression| @variable = column =Expression}[,... N]{ { [From {< table_source >} [,... n]][WHERE < search_condition >]}| [WHERE Current of {{[GLOBAL]Cursor_name}|Cursor_variable_name}]}[OPTION (< query_hint > [,... n])] #SQL Server Example:UpdateASetA.gqdltks=B.gqdltks,a.bztks=B.bztks fromLandleveldata A,GDQLPJ bwhereA.geo_code=B.lxqdm
(3) Access database Multi-table Update method
= "update++innerjoin tbarea2 B on   a.objectid=B. FID  Set+ + "=++ "=B.area_ LXDW "; Sqllist. ADD (x);
(4) Oracle Multi-Table Update method
Oracle Syntax:UPDATEUpdatedtableSET(col_name1[, Col_name2 ...])=(SELECTcol_name1,[, Col_name2 ...]  fromSrctable[WHERE where_definition]) Oracel Example:UpdateLandleveldata ASet(A.gqdltks, A.bztks)=(SelectB.gqdltks, B.bztks fromGDQLPJ bwhereA.geo_code=B.LXQDM)
(5) MySQL Multi-Table Update method
UPDATE SET col_name1=[, COL_NAME2=EXPR2 ... ][WHERE where_definition]updateset a.gqdltks = B.gqdltks, a.bztks=where a.geo_code=B.LXQDM

"Go" SQL multi-table federated update

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.