2013-02-11 20 views

回答

2
e.where("events.user_id not in (?) or type <> 'Post'", some_ids) 
0

数组 “其中不存在” 是你最喜爱的词语。例如,

select whatever 
from wherever 
where not exists 
(subquery goes here) 
+0

虽然它起作用,但它不一定是最有效的(取决于查询的其余部分) – 2013-02-11 03:27:29