I have studied that DBMS won't evaluate the second condition in a WHERE clause if the first condition is met.
select *
from student
where name = 'ABC' or name ='XYZ';
select *
from student
where name = 'ABC' or 'XYZ';
The first returns all the rows with name 'ABC' and 'XYZ' while second one returns just the rows with name 'ABC'.