Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何过滤 NULL 字段
no_repeat = Events.where(:repeat => NULL)
NULL 字不起作用
你可以这样做:
no_repeat = Events.where("repeat IS NULL") no_repeat = Events.where("repeat = ?", nil) no_repeat = Events.where(:repeat => nil) no_repeat = Events.where(repeat: nil)