Q 27. Explain SQL AND OR statement with an example ?
Ans : In SQL, the AND & OR operators are used for filtering the data and getting precise results based on conditions.
The AND and OR operators are used with the WHERE clause.
These two operators are called conjunctive operators.
AND Operator: This operator displays only those records where both conditions condition 1 and condition 2 evaluate to True.
OR Operator: This operator displays the records where either one of the conditions condition 1 and condition 2 evaluates to True. That is, either condition1 is True or condition2 is True.
No comments:
Post a Comment