imp80 system/manager@orcl file=D:\TEMP\dbfile1.dmp full=n fromuser=yh1 touser=yh2
參數說明:
• full=n:不匯入完整資料庫
• fromuser=yh1 touser=yh2:Schema 重對應匯入
UPDATE table1 a
SET a.column1 = (
SELECT b.column1
FROM table2 b
WHERE a.column2 = b.column2
)
WHERE a.column3 IS NOT NULL
邏輯:以 table1.column2 = table2.column2 關聯,將 table2.column1 值更新至 table1.column1,條件為 table1.column3 不為 NULL。
效能提示:確保關聯欄位 (`column2`) 有索引;大量更新時考慮分批次執行避免長時間鎖定。