Oracle中这两个更新SQL语句的区别?

时间:2015-08-11 19:47:52

标签: sql oracle

Oracle中这两个更新SQL语句之间有什么区别

首先:

UPDATE t1 
    SET    col1 = 'Y' 
    WHERE  EXISTS (SELECT * 
               FROM   t2 
               WHERE  t1.p1 = t2.p1 
                      AND t1.p2 = t2.p2 
                      AND t2.col3 = 'a' 
                      AND t1.p1 = 'b' 
                      AND t1.p2 = 'c') 

第二

UPDATE t1 
SET    col1 = 'Y' 
WHERE  EXISTS (SELECT * 
           FROM   t2 
           WHERE  t1.p1 = t2.p1 
                  AND t1.p2 = t2.p2 
                  AND t2.col3 = 'a') 
   AND t1.p1 = 'b' 
   AND t1.p2 = 'c'  

1 个答案:

答案 0 :(得分:0)

根本没有区别 - 它们具有相同的含义