如果~要把這個表的資料 補到另一個表去,而且是沒有的才補~
語法要怎麼下咧~
INSERT INTO Ping (SN) SELECT SN FROM record WHERE SN NOT IN(select SN from Ping);
先把~待補資料的表~全部查出來~
再比較兩個比~哪些是沒有的~
最後再完成insert into的動作~
解析難嗎?不難~但是~我之前只會用php語法和暫存來處理~
隨機文章
- Discuz討論區系統的關聯文章問題 (2012-11-18)
- rclone Google Drive server side copy fail (2020-07-18)
- UBUNTU 2004 IP Router / DNS / Gateway 設定方式 (2021-02-18)
- 被打敗的新聞 實在有夠鳥的 (2014-03-24)
- 為什麼這次超前佈署不採用Zoom (2020-03-10)
INSERT INTO wp_mail (ID) SELECT ID FROM wp_getinfo WHERE ID NOT IN(select ID from wp_mail)
insert into wp_mail_data(ID,Title,Content,Url) select ID,post_title,post_content,to_ping from wp_posts where ID not in (select ID from wp_mail_data);