mysql 查詢其他表做update

發佈時間:2009年11月03日 作者:Benson
文章分類:學習筆記  

這只是一篇文記,我不打算詳細說明
主要功能就是把某一個表的資料參照過來做更新

UPDATE file_record
SET tid =    (select cdb_posts.tid from cdb_posts where cdb_posts.pid=file_record.pid)
WHERE EXISTS (select cdb_posts.tid from cdb_posts where cdb_posts.pid=file_record.pid);

親愛的訪客您好:如果您覺得本篇文章寫的還不錯,請幫忙點一下右邊的工商服務,贊助本網站的運作。本站文章,歡迎非商業網站引用,請註明出處;商業引用,請與本站聯絡。
加入書籤: HemiDemi MyShare Baidu Google Bookmarks Yahoo! My Web Del.icio.us Digg technorati furl 加入此網頁到:YouPush 加入此網頁到:你推我報 UDN FunP 推推王 Facebook Twitter Plurk this!

相關文章

隨機文章

文章讀取...

留言回

請在這邊留言...您的想法和需求
如果您想要在留言時,出現大頭圖示的話,請到否邊這個網址gravatar申請。





*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word