列如表a有station和cause兩個欄位的資料,我想在表b中判斷表a的station和cause兩個欄位的資料都存在,不存在的寫到表b中,謝謝啦
uj5u.com熱心網友回復:
列轉行后比較b表,不存在就插入uj5u.com熱心網友回復:
insert into 表b(station,cause)
select a.station,a.cause
from 表a a
left join 表b b
on a.station=b.station
and a.cause=b.cause
where b.station is null
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/281876.html
標籤:疑難問題
