sql 數據庫實時增量更新


 

---一下sql可以添加到作業中每秒執行一次   數據過多會消耗性能   

 

--數據表如下,其中字段pid mid time price_type是一個組合主鍵
--pid mid time price price_type uid
insert into 增量更新2( pid, mid, times, price, price_type, uid )
select pid, mid, times, price, price_type, uid
from 增量更新1 t2
where not exists( select 1 from 增量更新2 where pid = t2.pid
and mid = t2.mid and times = t2.times and price_type = t2.price_type )

 

 

 

 

不要看他人高薪,且看閑時誰在拼


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM