I need an SQL statement that check if one condition is satisfied:
SELECT * FROM my_table WHERE my_table.x=1 OR my_table.y=1
I want to do th
Alternate syntax using Hash
Account.where("id = :val1 OR id = :val2", val1: 1, val2: 2).
This is particularly useful, when the value is compared with multiple columns. eg:
User.where("first_name = :name OR last_name = :name", name: 'tom')