看板 Database 關於我們 聯絡資訊
[資料庫] Mysql 4.1 ex: table1: table2: c1 c2 ------ ------ 1 1 2 2 3 6 4 5 需要從 table1.c1 中, 找出 table1.c1 不等於 table2.c2 的數值 使得輸出為: 3 4 5 有個方式為 select c1 from table1 where c1 not in ( select c2 from table2 ); 不過這牽涉到兩次 select 請問: 有別的方式可以達到相同的效果嗎??? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.139.135.197 ※ 編輯: ogrechen 來自: 220.139.135.197 (12/01 18:07)
flakchen:不懂兩次Select有啥不好?? 12/01 20:48
Adonisy:兩次 select不好? 12/02 14:11