摘要:
merge into 常用于联表更新 格式: merge into ... using (...) on (...) when matched then ... when not matched then... 例如:A和B 匹配时更新,不匹配则插入 merge into A a using (se 阅读全文
摘要:
表A ID NAME 1 A1 2 A2 3 A3 表B ID AID NAME 1 1 B1 2 2 B2 3 2 B3 SELECT ID,NAME FROM A WHERE EXIST (SELECT * FROM B WHERE A.ID=B.AID) 等价于 select id.name 阅读全文