UPDATE table2
SET table2.col1 = table1.col1,
table2.col2 = table1.col2,
table2.col3 = table2.col3,
...
FROM table1, table2
WHERE table1.memberid = table2.memberid
Run Code Online (Sandbox Code Playgroud)
请帮助我了解如何在有9-10行时使用SET子句,并使用公共列名SCRIPT_ID,以便将来可以再次使用脚本来更新同一个表.
这是表中的一个片段:
____ _____________ __________________ _____ _ _____
999 EMS02075SVC Host Controller 15099 3 60000
1000 EMS02075SVC DSM Controller 15099 1 60000
1001 EMS02075WEB1 Application Server 4447 1 60000
Run Code Online (Sandbox Code Playgroud)