How to and where to use AND and OR Operators in Select Statement
We should remember a fundamental concept. AND restricts further and OR loosens the restrictions in the result set
SELECT ENAME, SAL FROM EMP WHERE DEPTNO=10 AND SAL>1500;
The above statement will display the restricted set of rows whose department no is 10 and SAL is greater than 1500.
If we use OR instead of AND
it will display the rows, where ever there is a department number 10 as well as SAL is greater than 1500