2017-06-19 70 views

回答

0

你可能會尋找類似:

UPDATE mytable 
    SET tofill.ID   = fillvalues.ID 
     ,tofill.JOININGDATE = fillvalues.JOININGDATE 
    FROM mytable tofill 
    INNER JOIN 
    (SELECT DISTINCT ID, JOININGDATE, NAME 
     FROM mytable 
    WHERE ID   IS NOT NULL 
     AND JOININGDATE IS NOT NULL 
) fillvalues 
    ON tofill.NAME = fillvalues.NAME 
    WHERE tofill.ID   IS NULL 
    OR tofill.JOININGDATE IS NULL 
;  

我不熟悉甲骨文,但聲明應該是相同或相似的

+0

無法執行您的查詢 – srinivas